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
4336278b44
*: support put with lease
2016-01-04 15:54:06 -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
ec12686233
v3api: add support for sending watcher control response
2016-01-02 22:31: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
Xiang Li
ac330bb7c9
*: update watch related proto
...
1. Add watch/cancel request
2. Add necessary fields in response to return watch error
3. Add watch_id into watch response
2016-01-01 10:22:21 -08:00
Gyu-Ho Lee
8f03c600b5
etcdserver/api/v3rpc: watch.go with events slice
2015-12-31 19:25:15 -08:00
Gyu-Ho Lee
8da6e76588
etcdserver/etcdserverpb: rpc WatchResponse with events slice
2015-12-31 19:24:46 -08:00
Xiang Li
1dc0e664f0
*: fix proto and regenerate all go files
2015-12-30 20:11:19 -08:00
Gyu-Ho Lee
f19a07289a
Merge pull request #4098 from gyuho/merge_log
...
*: use merge logger for repeating etcdserver error logs
2015-12-29 21:23:30 -07:00
Anthony Romano
8346a7c052
Merge pull request #4094 from heyitsanthony/send-merged-done-nowait
...
etcdserver: respect done channel when sleeping for snapshot backoff
2015-12-29 20:18:08 -08:00
Gyu-Ho Lee
8f943f2f45
etcdserver/etcdhttp: use MergeLogger to log etcdserver errors
...
Related https://github.com/coreos/etcd/issues/3812 .
2015-12-29 20:00:52 -08:00
Anthony Romano
942b5570bd
Merge pull request #4096 from heyitsanthony/serialize-applier-snapmerge
...
etcdserver: serialize snapshot merger with applier
2015-12-29 19:37:11 -08:00
Anthony Romano
4cd86ae1ef
etcdserver: serialize snapshot merger with applier
...
Avoids inconsistent snapshotting by only attempting to
create a snapshot after an apply completes.
Fixes #4061
2015-12-29 18:38:39 -08:00
Anthony Romano
c7c3bda8b9
etcdserver: respect done channel when sleeping for snapshot backoff
2015-12-29 13:23:41 -08:00
Xiang Li
9d9680121c
etcdserver/etcdserverpb: make rpc.proto updated
2015-12-29 12:58:14 -08:00
Xiang Li
d9d7137ea3
Merge pull request #4092 from xiang90/api
...
*: update api proto
2015-12-29 12:46:12 -08:00
Xiang Li
1a0201a31a
*: update api proto
2015-12-29 12:31:53 -08:00
Xiang Li
150e646b05
etcdserver: always check if the data dir is writable before starting etcd
2015-12-29 11:29:01 -08:00
Xiang Li
aef55342d1
etcdsever: avoid creating member dir before finishing validate bootstrap
...
This commit fixes the issue of creating member dir before validating
the configuration. When member dir exists, it indicates the local etcd
process is a valid etcd member. So we should only create member dir
after we finish configuration validation, joining validation or
discovery validation.
2015-12-28 23:20:27 -08:00
Xiang Li
eae52a3138
Revert "etcdserver: always remove member directory when bootstrap fails"
...
This reverts commit a7e443d6412ec405948571d1f758ab7f1c078bf9.
2015-12-28 23:16:08 -08:00
Gyu-Ho Lee
a7e443d641
etcdserver: always remove member directory when bootstrap fails
...
This removes member directory when bootstrap fails including joining existing
cluster and forming a new cluster. This fixes https://github.com/coreos/etcd/issues/3827 .
2015-12-28 22:56:03 -08:00
Xiang Li
72e115ee6e
Merge pull request #4062 from xiang90/fix_snap
...
*: fix snapshot sending cycle
2015-12-23 17:10:10 -08:00
Anthony Romano
d7ad721ede
etcdserver: stop if removed along with multiple conf changes
...
shouldstop would get clobbered when several conf changes are in an apply
2015-12-23 16:29:21 -08:00
Xiang Li
4be152bb4f
rework
2015-12-23 16:21:16 -08:00
Xiang Li
9a51d40940
fix comment
2015-12-23 14:10:39 -08:00
Xiang Li
ab31ba0d29
*: fix snapshot sending cycle
2015-12-23 13:58:57 -08:00
Xiang Li
d6d12b4d86
etcdserver: move unti out of server.go
...
etcdserver file is messy enough. Let's make it be less messy.
2015-12-22 15:17:14 -08:00
Anthony Romano
aca0c466ed
etcdserver: asynchronously notify applier when raft writes finish
...
The raft loop would block on the applier's done channel after
persisting the raft messages; the latency could cause dropped network
messages. Instead, asynchronously notify the applier with a buffered
channel when the raft writes complete.
2015-12-22 14:15:14 -08:00
Anthony Romano
9d05a0d959
etcdserver: apply v3 database updates outside server event loop
...
raft's applyc writes block on the server loop's database IO since
the next applyc read must wait on the db operation to finish.
Instead, stream applyc to a run queue outside the server loop.
2015-12-22 14:15:09 -08:00
Anthony Romano
7e00325fe9
etcdserver: refactor server.go select loop
...
splits out the apply case into smaller functions
2015-12-22 12:13:39 -08:00
Gyu-Ho Lee
0ff822bf22
etcdserver/auth: fix shadowed variables from go tool
...
Fixes for https://github.com/coreos/etcd/issues/3954 .
2015-12-12 09:20:26 -08:00
Gyu-Ho Lee
40b11038f2
etcdserver: fixes shadowed variables for go tool vet
...
Fix for https://github.com/coreos/etcd/issues/3954 .
2015-12-12 09:13:12 -08:00
Xiang Li
c4cbaf5c2a
etcdsever: swap kv pointer atomically
2015-12-10 17:29:36 -08:00
Xiang Li
23bd60ccce
*: rewrite snapshot sending
2015-12-08 18:21:21 -08:00
Xiang Li
0708a5e50d
etcdserver: refactor a for loop in recvSnap test
2015-12-02 15:41:03 -08:00
Xiang Li
67ffeee521
Merge pull request #3946 from xiang90/fix_snap_test
...
etcdserver: get rid of unreliable WaitSchedule
2015-12-02 15:01:20 -08:00
Xiang Li
3ec3ffbef0
etcdserver: get rid of unreliable WaitSchedule
...
In this case, we know we are waiting for an action happened on
storage. We can do a busy wait instead of calling waitSchedule.
The test previously failed on CI with no observed actions.
2015-12-02 13:18:11 -08:00
ngaut
e142e073e8
v3rpc: Tiny clean up
...
unreachable code
2015-12-02 12:30:21 +08:00
Barak Michener
452e5bffc0
etcdserver: Fix panic for v3 transaction compares on non-existent keys
...
Fixes #3920
2015-11-24 16:49:45 -05:00
Xiang Li
b868f4b1b1
v3rpc: report eventReceived correctly
2015-11-19 22:44:46 -08:00
Xiang Li
3cf90a4dff
v3rpc: do not send closing event
...
When a watch stream closes, both of the watcher.Chan and closec
will be closed.
If watcher.Chan is closed, we should not send out the empty event.
Sending the empty is wrong and waste a lot of CPU resources.
Instead we should just return.
2015-11-19 17:56:15 -08:00
Xiang Li
c400d05d0a
Merge pull request #3892 from xiang90/fix_snapshot_handling
...
etcdserver: handle incoming v3 snapshot correctly
2015-11-19 12:18:18 -08:00
Xiang Li
a07e4bb6e2
etcdserver: handle incoming v3 snapshot correctly
...
1. we should update all kv reference (including the
on in snapStore).
2. we should first restore a new KV and then close
the old one asynchronously.
2015-11-18 16:07:41 -08:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Xiang Li
b4abe5b584
etcdserver: start real txn for txn request
...
We should open real txn for applying txn requests. Or the intermediate
state might be observed by reader.
This also fixes #3803 . Same consistent(raft) index per multiple indenpendent
operations confuses consistentStore.
2015-11-16 21:11:27 -08:00
Xiang Li
a1616afc5d
auth: use canonical path for pre-defined guest role
2015-11-15 17:58:09 -08:00
Xiang Li
ff36b9d9bc
Merge pull request #3700 from xiang90/metrics_hi
...
Replace Summary with Histogram for all metrics
2015-11-10 10:06:45 -08:00