Anthony Romano
f9af744be3
lease: move storage.NoLease to lease package
2016-01-07 10:33:44 -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
Hitoshi Mitake
af2569c2d8
storage, test: unlock transaction in the retry loop
2015-12-17 10:35:03 +09:00
Sean Russell
928c0d3601
storage/backend: fixes Windows compile error
...
The type is "Options," not "Option" -- at least, in the vendored version of boltdb in the repository.
2015-12-16 11:10:46 -08:00
Gyu-Ho Lee
891cdd56b4
storage: newFakeStore to return only 1
...
This changes newFakeStore function to return only 1 because two other arguments
are already in the first return storage struct.
2015-12-13 17:46:47 -08:00
Gyu-Ho Lee
d55ab7798b
storage: change var names from 'index'
...
Having the same variable name as 'index' type
can be confusing and shadowing other variables.
This gives different variable names to 'index' variables.
2015-12-12 16:37:24 -08:00
Gyu-Ho Lee
52d21331e2
storage: fixes shadowed variables
...
Fixes for https://github.com/coreos/etcd/issues/3954 .
2015-12-12 09:20:34 -08:00
Gyu-Ho Lee
bed6b90e61
storagepb: minor updates from genproto
...
I ran genproto with the most recent protocol buffer
and it adds one line of missing comment.
2015-12-04 16:16:54 -08:00
Xiang Li
127b529582
Merge pull request #3959 from xiang90/fix_storage_test
...
storage: make RestoreContinueUnfinishedCompaction more reliable
2015-12-04 13:03:29 -08:00
Xiang Li
a0eca5fd37
storage: make RestoreContinueUnfinishedCompaction more reliable
2015-12-04 11:48:46 -08:00
Gyu-Ho Lee
ff2e8b55ae
storage: add tests for unsafeAddWatching
...
This adds map operation tests for unsafeAddWatching, which
could have been failed without https://github.com/coreos/etcd/pull/3939 .
It tests if unsafeAddWatching is correctly updating synced map.
2015-12-02 14:18:07 -08:00