Xiang Li
f01c8188f8
*: rename lease.DeleteableRange to lease.RangeDeleter
2016-01-09 11:01:58 -08:00
Xiang Li
f5753f2f51
*: support lease Attach
...
Now we can attach keys to leases. And revoking the lease removes all
the attached keys of that lease.
2016-01-09 11:01:58 -08:00
Gyu-Ho Lee
f76166a041
*: fix minor typos
2016-01-08 00:21:19 -08:00
Mordy Ovits
0d01035693
Minor typo in metrics help field
2016-01-07 16:18:50 -05:00
Anthony Romano
8774d53459
Merge pull request #4158 from heyitsanthony/nolease-to-leasepkg
...
lease: move storage.NoLease to lease package
2016-01-07 10:43:51 -08:00
Anthony Romano
f9af744be3
lease: move storage.NoLease to lease package
2016-01-07 10:33:44 -08:00
Xiang Li
43a777b7a2
*: get snapshot from backend
...
We should get snapshot from backend, not just KV.
We plan to store the lease data into backend too.
2016-01-06 22:40:23 -08:00
Xiang Li
1714290f4e
storage: support recovering from backend
...
We want the KV to support recovering from backend to avoid
additional pointer swap. Or we have to do coordination between
etcdserver and API layer, since API layer might have access to
kv pointer and use a closed kv.
2016-01-06 21:16:55 -08:00
Xiang Li
b546f4c2c2
Merge pull request #4152 from xiang90/fix_force
...
backend: create bucket should increase pending
2016-01-06 20:47:32 -08:00
Xiang Li
5dd8af444a
backend: create bucket should increase pending
2016-01-06 20:25:50 -08:00
Gyu-Ho Lee
c70d533771
Merge pull request #4138 from gyuho/watchresponse_header
...
*: fill in WatchResponse.Header
2016-01-06 15:19:36 -08:00
Gyu-Ho Lee
366e7a879f
*: fill in WatchResponse.Header
...
Related to coreos#3848.
2016-01-06 15:12:53 -08:00
Gyu-Ho Lee
ad29ba3073
storage: remove test file after test
2016-01-05 22:05:28 -08:00
Xiang Li
5dd3f91903
*: make backend outside kv
...
KV and lease will share the same backend. Thus we need to make
backend outside KV.
2016-01-05 19:55:29 -08:00
Xiang Li
1e61243fd7
Merge pull request #4134 from xiang90/lease
...
lease: modify API and persist lease to disk
2016-01-05 10:30:52 -08:00
Xiang Li
09b420f08c
*: move leaseID typedef to lease pkg
2016-01-05 10:18:17 -08:00
Anthony Romano
384cc76299
pkg/testutil: make Recorder an interface
...
Provides two implementations of Recorder-- one that is non-blocking
like the original version and one that provides a blocking channel
to avoid busy waiting or racing in tests when no other synchronization
is available.
2016-01-05 09:39:18 -08:00
Gyu-Ho Lee
7339abc79e
storage: fix watchable_store notify to hash-lookup once
...
We should just assign events and ok at first, and check the
boolean value, instead of looking up the map twice.
2016-01-04 22:34:48 -08:00
Anthony Romano
21a6ade53d
storage: change type of WatchIDs from int64 to WatchID
2016-01-04 19:52:22 -08:00
Gyu-Ho Lee
556d4a6932
*: remove CancelFunc return for Watch. Use Cancel for watch.
2016-01-04 16:17:55 -08:00
Xiang Li
b3ad736d2a
Merge pull request #4131 from xiang90/kv_lease
...
*: support put with lease
2016-01-04 16:05:35 -08:00
Xiang Li
4336278b44
*: support put with lease
2016-01-04 15:54:06 -08:00
Alexander Kolbasov
152dcdd04d
storage/backend: disable MAP_POPULATE on Solaris
2016-01-04 14:42:57 -08:00
Gyu-Ho Lee
6540f47dfa
*: WatchResponse for multiple Events with WatchID
...
storage/storagepb: remove watchID from Event
storage: add WatchResponse to watcher.go to wrap events, watchID
storage: watchableStore to use WatchResponse
storage: kv_test with WatchResponse
etcdserver/api/v3rpc: watch to receive storage.WatchResponse type
2016-01-03 16:32:48 -08:00
Xiang Li
eda0eefc25
*: support watcher cancellation inside watchStream
2016-01-03 00:20:21 -08:00
Xiang Li
807db7e2aa
storage: rename watching -> watcher
2016-01-02 20:20:22 -08:00
Xiang Li
ee0b3f42ed
*: rename watcher to watchStream
...
Watcher vs Watching in storage pkg is confusing. Watcher should be named
as watchStream since it contains a channel as stream to send out events.
Then we can rename watching to watcher, which actually watches on a key
and send watched events through watchStream.
This commits renames watcher to watchStram.
2016-01-02 16:03:57 -08:00
Gyu-Ho Lee
7dd599b69d
Merge pull request #4091 from gyuho/watch_events_slice
...
storage: watch events in slice
2015-12-31 23:54:08 -08:00
Gyu-Ho Lee
b59c993681
storage: kv_test.go events slice
2015-12-31 23:44:02 -08:00
Gyu-Ho Lee
14a0268ebc
storage: watchable_store_test.go events slice
2015-12-31 23:44:02 -08:00
Gyu-Ho Lee
0b01acf131
storage: watchable_store.go events slice
2015-12-31 23:44:02 -08:00
Gyu-Ho Lee
f568a1ccfc
storage: watcher_test.go events slice
2015-12-31 23:43:59 -08:00
Xiang Li
a74147384d
Merge pull request #4070 from mitake/storage-bench
...
tools: a new tool for benchmarking storage backends
2015-12-31 22:26:46 -08:00
Gyu-Ho Lee
5aded6cd77
storage: watcher.go events slice
2015-12-31 19:26:20 -08:00
Hitoshi Mitake
0b2d31f3bc
storage: decouple default parameters and storage creation
...
newStore() uses constants for some important parameters
e.g. batchInerval. It is not suitable for other storage users
(e.g. tools/benchmark). This commit decouples the default parameters
from storage creation. etcd should use a newly added function
newDefaultStore() for creating a store with default parameters.
2015-12-31 22:28:59 +09:00
Xiang Li
1dc0e664f0
*: fix proto and regenerate all go files
2015-12-30 20:11:19 -08:00
Xiang Li
1a0201a31a
*: update api proto
2015-12-29 12:31:53 -08:00
Gyu-Ho Lee
c3655cbfd9
Merge pull request #4084 from gyuho/revisioin_document
...
storage: add/fix revision/generation description
2015-12-28 20:45:36 -07:00
Gyu-Ho Lee
5284c1c3bb
storage: add/fix revision/generation description
...
This adds some struct descriptions to revision/generation structs and corrects
some spelling errors.
2015-12-28 19:32:03 -08:00
Gyu-Ho Lee
6c5dc28d0f
Merge pull request #4043 from gyuho/storage_range_all_unsynced
...
storage: range all unsynced at once
2015-12-28 14:45:40 -07:00
Gyu-Ho Lee
d64eb94580
storage: clean up test variable names, minor typos in comments
...
This just changes variable name to be more consistent: `N` rather than `Size`.
And fix some minor grammatical errors.
2015-12-28 11:49:57 -08:00
Gyu-Ho Lee
ecc3e15a46
storage: delete RangeHistory
...
This has been replaced by operations inside `syncWatchings`.
2015-12-28 11:37:32 -08:00
Gyu-Ho Lee
78b0b8a4a0
storage: range all unsynced at once
...
This is for https://github.com/coreos/etcd/issues/3848 .
It replaces RangeHistory method for more efficient event
sending.
2015-12-28 11:37:26 -08:00
Xiang Li
aec356e416
Merge pull request #4064 from xiang90/reduce_fysnc
...
backend: do not commit unless there is a pending change
2015-12-28 07:31:50 -08:00
Gyu-Ho Lee
df0c2e6842
storage: remove unnecessary math/rand seed
...
As @jonboulle pointed out at
https://github.com/coreos/etcd/pull/4070/files#r48441847 :
> math/rand is unrelated to crypto/rand; the latter reads from /dev/urandom and
> is relying on the kernel's PRNG. Just remove the seed entirely.
2015-12-25 09:55:11 -08:00
Xiang Li
8bc59b66d1
backend: do not commit unless there is a pending change
...
Reduce the nubmer of fsync etcd issues when the cluster is
idle.
2015-12-23 18:58:37 -08:00
Gyu-Ho Lee
28d0e473a7
storage: add more tests for synced, unsynced for watchable store
...
This adds more tests on functions that updates synced and unsynced in watchable
store. Preparatory change for https://github.com/coreos/etcd/issues/3848 .
2015-12-21 20:20:08 -08:00
Gyu-Ho Lee
84d777305d
storage: use only one mutex for store struct
...
Mutex is a variable, which means there needs to be only one mutex
value per scope. We don't need a separate mutex inside store struct,
**if we assume that `TxnPut` and `TxnRange` are called ONLY ONCE
per transaction (between `TxnBegin` and `TxnEnd`)**, as documented.
2015-12-21 11:42:40 -08:00
Gyu-Ho Lee
2377ef870a
storage: remove unnecessary test variable assignment
...
There is no need to assign a separate variable since 'base' is already defined
as a local variable within the loop.
2015-12-20 14:23:27 -08:00
Xiang Li
9b0b15c9be
Merge pull request #4006 from mitake/kvtest-deadlock
...
storage, test: unlock transaction in the retry loop
2015-12-16 18:06:14 -08:00