6bf609b96d
integration: update TestMemberPromote test
...
Update TestMemberPromote to include both learner not-ready and learner
ready test cases.
Removed unit test TestPromoteMember, it requires underlying raft node to
be started and running. The member promote is covered by the integration
test.
2019-05-28 18:50:13 -07:00
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-05-28 15:39:35 -07:00
c836e37a83
etcdserver: remove unnecessary bool comparison
...
Fixes 'gosimple' test.
2019-05-15 13:48:54 -07:00
7f9479acc1
clientv3: add member promote
2019-05-15 13:27:42 -07:00
ba9fd620e8
etcdserver: support MemberPromote for learner
2019-05-15 13:27:42 -07:00
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
e8f46ce341
etcdserver: add a test to verify not to send duplicated append responses
2019-01-09 10:37:43 +08:00
1399bc69ce
etcdserver: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2018-08-28 17:47:55 -07:00
e714dd01b3
etcdserver: remove unnecessary type conversion
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-07-05 10:08:56 -07:00
7940113906
*: move internal "etcdserver/api/rafthttp"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-21 10:31:16 -07:00
9149565cb3
*: move to "etcdserver/api/membership"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-21 10:31:16 -07:00
1e4f56114e
etcdserver: use new "snap" import paths
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-21 07:45:34 -07:00
49d672ff9b
etcdserver: rename "SnapshotCount", add "SnapshotCatchUpEntries"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-18 14:37:50 -07:00
366db18662
etcdserver: define test transporter
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-17 14:16:52 -07:00
7a92bbfed2
etcdserver/*: move internal v2 packages
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-14 12:49:49 -07:00
bdbed26f64
etcdserver: support structured logging
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-16 17:36:00 -07:00
811566f2f2
*: fix "v2store" imports
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
8a518b01c4
*: revert "internal/mvcc" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
9b5d6edc4b
*: revert "internal/raftsnap"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
0e12e888e0
*: move "internal/store" to "etcdserver/v2store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
dd2f3b0de8
*: revert "internal/lease" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -08:00
80d15948bc
*: move "mvcc" to "internal/mvcc"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-26 11:14:41 -08:00
349a377a67
*: move "lease" to "internal/lease"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-26 11:09:29 -08:00
880835c02c
*: move "store" to "internal/store"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-26 11:06:22 -08:00
dee39bf786
internal/raftsnap: move "raftsnap" to internal
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-24 10:36:04 -08:00
6a70a931d3
etcdserver: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-24 10:26:07 -08:00
9a726b424d
*: fix leaky context creation with cancel
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-09-07 13:39:42 -07:00
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-09-07 13:39:42 -07:00
758c3c09fd
etcdserver: refactor v2 request processing
...
Makes interfaces more reusable.
2017-08-31 11:47:40 -07:00
1d3afd4bb5
etcdhttp, v2http, etcdserver: use etcdserver.{Server,ServerV2} interfaces
2017-08-31 11:47:40 -07:00
1acc8090e3
Merge pull request #8110 from heyitsanthony/fix-test-sync-timeout
...
etcdserver: use RecorderStream for TestSyncTimeout to avoid missing action
2017-06-15 20:49:10 -07:00
aa0e6b26c0
etcdserver: use RecorderStream for TestSyncTimeout to avoid missing action
2017-06-15 13:43:53 -07:00
dcf52bbfac
etcdserver, embed, integration: don't use pointer for ServerConfig
...
ServerConfig is owned by etdcserver and unshared, so don't pass or store by
pointer. Also removes duplicated field 'snapCount'.
2017-06-15 13:02:13 -07:00
f6cd4d4f5b
snap, etcdserver: tighten up snapshot path handling
...
Computing the snapshot file path is error prone; snapshot recovery was
constructing file paths missing a path separator so the snapshot
would never be loaded. Instead, refactor the backend path handling
to use helper functions where possible.
2017-05-11 13:46:59 -07:00
dfdaf082c5
etcdserver: add a test to ensure renaming db happens before persisting wal and snap files
2017-05-09 14:00:22 -07:00
e33b10a666
etcdserver: add a test to ensure config change also update ConsistIndex
2017-05-02 16:51:40 -07:00
714b48a4b4
etcdserver: initialize raftNode with constructor
...
raftNode was being initialized in start(), which was causing
hangs when trying to stop the etcd server since the stop channel
would not be initialized in time for the stop call. Instead,
setup non-configurable bits in a constructor.
Fixes #7668
2017-04-18 09:33:59 -07:00
d9ec6b4d22
*: return updated member list in v3 rpcs
...
Now it's possible to atomically know the new member configuration from
issuing a membership change RPC.
2017-04-12 16:24:51 -07:00
8ad935ef2c
etcdserver: use cancelable context for server initiated requests
2017-03-31 19:19:33 -07:00
80c10e150f
etcdserver: remove possibly compacted entry look-up
...
Fix https://github.com/coreos/etcd/issues/7470 .
This patch removes unnecessary term look-up in
'createMergedSnapshotMessage', which can trigger panic
if raft entry at etcdProgress.appliedi got compacted
by subsequent 'MsgSnap' messages--if a follower is
being (in this case, network latency spikes), it
could receive subsequent 'MsgSnap' requests from leader.
etcd server-side 'applyAll' routine and raft's Ready
processing routine becomes asynchronous after raft
entries are persisted. And given that raft Ready routine
takes less time to finish, it is possible that second
'MsgSnap' is being handled, while the slow 'applyAll'
is still processing the first(old) 'MsgSnap'. Then raft
Ready routine can compact the log entries at future
index to 'applyAll'. That is how 'createMergedSnapshotMessage'
tried to look up raft term with outdated etcdProgress.appliedi.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-03-15 12:46:56 -07:00
3d75395875
*: remove never-unused vars, minor lint fix
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-03-06 14:59:12 -08:00
6a0a0a7ea1
etcdserver: make snaptest fail fast
2016-11-03 14:44:08 -07:00
136c02da71
Merge pull request #6738 from gyuho/raft-cleanup
...
etcdserver: move 'EtcdServer.send' to raft.go
2016-10-31 15:15:08 -07:00
5bd00ab1f6
*: fix minor typos
2016-10-31 09:47:15 -07:00
6ec03d3f7c
etcdserver: move 'EtcdServer.send' to raft.go
...
Clear 'TODO'
2016-10-26 16:26:00 -07:00
0c61d8804a
etcdserver: make WaitGroup.Add sync with Wait
2016-10-12 13:11:35 -07:00
289e3c0c63
etcdserver: use stream recorder for TestPublishRetry
...
Fixes #6546
2016-09-30 15:43:32 -07:00
3866e78c26
etcdserver: tighten up goroutine management
...
All outstanding goroutines now go into the etcdserver waitgroup. goroutines are
shutdown with a "stopping" channel which is closed when the run() goroutine
shutsdown. The done channel will only close once the waitgroup is totally cleared.
2016-09-19 12:10:41 -07:00
a56cb82180
etcdserver: add TransferLeadership for raft.Node
2016-08-10 16:26:11 -07:00
cfe09d34b8
etcdserver: don't race when waiting for store in TestSnapshot
2016-07-27 15:37:27 -07:00