Commit Graph

208 Commits (2e051c1c610496ccfc44389ff89eab49504d7176)

Author SHA1 Message Date
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Xiang Li 4ba1ec6a4d Merge pull request #4363 from xiang90/watch
storage: simplify watch store
2016-01-31 16:49:44 -08:00
Xiang Li 611751aee2 storage: simplify watch store
We decided that we will not support modifing the same
key in one txn multiple times. That can simlify the current
code/design a lot.
2016-01-31 16:33:07 -08:00
Gyu-Ho Lee f6215574f2 *: kv range to return current revision
This changes the behavior of KV's range and tx range to return
current revision rather than range revision. This makes populating
range response header easier.
2016-01-30 17:37:34 -08:00
Gyu-Ho Lee a35d5889f6 *: update gRPC, proto interface 2016-01-26 17:41:39 -08:00
Xiang Li 128b5e7387 etcdserver: check invalid range in txn 2016-01-25 20:21:17 -08:00
Anthony Romano 5a967eb2a0 storage: publish delete events on lease revocation 2016-01-22 13:40:55 -08:00
Gyu-Ho Lee 835d824965 *: minor typos, kill TODOs 2016-01-20 16:21:39 -08:00
Anthony Romano ecba9b61cf storage: start initial revision at 1
When the start revision was 0, there was no way to safely watch
starting from the first store revision.
2016-01-14 17:05:56 -08:00
Gyu-Ho Lee 497bbd3010 *: FatalStack to stacktrace tests after timeout
Related to https://github.com/coreos/etcd/issues/4065.
2016-01-14 10:20:14 -08:00
Xiang Li 2eac21ae0a Merge pull request #4210 from xiang90/fix_panic
storage: fix panic in test
2016-01-14 08:05:46 -08:00
Xiang Li f2b0689f74 storage: fix panic in test 2016-01-13 23:18:27 -08:00
Xiang Li e1de19bf75 backend: make test more reliable 2016-01-13 22:00:25 -08:00
Xiang Li 0cba12d991 storage: extend timeout for slow CI
1. extend timeout

2. print out stacktrace. When it fails again, we can get more confidence that the
failure is caused by slow IO.
2016-01-13 16:04:19 -08:00
Gyu-Ho Lee 4f427bca43 storage: check prefix in unsynced
Current syncWatchers method skips the events that have
prefixes that are being watched when the prefix is not
existent as a key. This fixes https://github.com/coreos/etcd/issues/4191
by adding prefix checking to not skip those events.
2016-01-13 11:21:47 -08:00
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