3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02:00
fce0c192eb
Regenerate protos.
2021-03-25 00:31:44 +01:00
3976d68ed3
raftExample: Allow closing raftexample node when snapshotting.
...
Fix race that made the raftExample test fail.
2021-02-26 08:56:12 +01:00
5ae3f879c9
raftexample: Return an appropriate applyDoneC
2021-02-24 21:28:18 +09:00
1b1be43d65
raftexample: New joined node have to start with RestartNode
2021-02-22 09:45:44 +09:00
cc2b039817
raftexample: Explicitly notify all committed entries are applied
2021-02-19 19:26:36 +09:00
2d25f7f3da
raftexample: Implement ReportUnreachable and ReportSnapshot
2021-02-17 11:59:32 +09:00
1302e1edb2
raftexample: Save snapshot file before writing to wal
2021-02-16 13:30:15 +09:00
be2167ebab
Wait until all committed entries are applied
...
To take a snapshot
2021-02-05 19:05:41 +09:00
cb14cdd774
raftexample: Fix recovery from snapshot
...
* If there is a snapshot, HTTP server won't start.
* Resotring form snapshot occurs after replaying WAL.
* When taking a snapshot, the last change is not applied to the state machine yet.
2021-02-05 09:34:34 +09:00
aaf423e962
server: Update imports.
...
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
e62417297d
*: Rename of imports of raft (as its now a module)
...
% find -name '*.go' -o -name '*.md' -o -name '*.sh' | xargs sed -i --follow-symlinks 's|etcd/v3/raft|etcd/raft/v3|g'
2020-10-16 13:58:18 +02:00
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
96cce208c2
go.mod: use go.etcd.io/etcd/v3 versioning
...
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.
Used this tool to update package imports:
https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
61f279454e
etcdserver/api: remove capnslog ( #11606 )
...
* etcdserver/api/rafthttp: remove capnslog
* etcdserver/api/membership: remove capnslog
* etcdserver/api/v2auth: remove capnslog
* etcdserver/api/v2discovery: remove capnslog
* etdserver/api/v2stats: remove capnslog
* etcdserver/api/v2http: remove capnslog
* etcdserver/api/v3rpc: remove capnslog
* etcdserver/api: remove capnslog
Remove capnslog from etcdserver/api. Note that capnslog was
already removed in some packages under etcdserver/api in
previous commits.
2020-02-11 13:51:25 -08:00
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-05-28 15:39:35 -07:00
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
4452d4be22
contrib/raftexample: fix naked return.
2019-03-20 09:52:12 +08:00
dac8c6fcc0
Merge pull request #10167 from nvanbenschoten/nvanbenschoten/limitUncommitted
...
raft: provide protection against unbounded Raft log growth
2018-10-13 23:52:28 -07:00
f89b06dc6d
raft: provide protection against unbounded Raft log growth
...
The suggested pattern for Raft proposals is that they be retried
periodically until they succeed. This turns out to be an issue
when a leader cannot commit entries because the leader will continue
to append re-proposed entries to its log without committing anything.
This can result in the uncommitted tail of a leader's log growing
without bound until it is able to commit entries.
This change add a safeguard to protect against this case where a
leader's log can grow without bound during loss of quorum scenarios.
It does so by introducing a new, optional ``MaxUncommittedEntriesSize
configuration. This config limits the max aggregate size of uncommitted
entries that may be appended to a leader's log. Once this limit
is exceeded, proposals will begin to return ErrProposalDropped
errors.
See cockroachdb/cockroach#27772
2018-10-13 23:25:05 -04:00
1cab49ef78
Merge pull request #9718 from kchristidis/fix-snap-pub-error
...
raftexample: Fix publish snapshot error message
2018-10-11 16:45:55 -07:00
d37f1521b7
*: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2018-08-28 17:47:55 -07:00
9431532730
raftexample: Fix publish snapshot error message
...
The error message is different to the condition it checks for. This PR
modifies the error message accordingly.
Closes #9717 .
Signed-off-by: Kostas Christidis <kostas@christidis.io >
2018-07-26 11:14:15 -04:00
42bef8460c
*: clean up code format
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-07-21 16:34: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
04df89bc11
contrib/raftexample: rename internal packages
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-21 07:45:34 -07:00
4a0bf23d1f
contrib/raftexample: rename "snapCount"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-18 14:39:47 -07:00
7a92bbfed2
etcdserver/*: move internal v2 packages
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-05-14 12:49:49 -07:00
0303480b1a
contrib/raftexample: fix typo
2018-05-01 11:22:36 +08:00
9063805180
contrib/tools: support structured logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-04-16 17:36:00 -07:00
9b5d6edc4b
*: revert "internal/raftsnap"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-02-26 17:11:40 -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
2b6fd3094f
*: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com >
2018-01-24 10:26:07 -08:00
75110dd839
*: fix naked returns
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com >
2017-11-10 18:46:15 -08: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
74e020b715
contrib/raftexample: save snapshot to WAL first
...
Save the snapshot index to the WAL before saving the snapshot to the
filesystem. This ensures that we'll only ever call wal.Open with a
snapshot that was previously saved to the WAL.
2017-06-13 11:24:07 -07:00
887db5a3db
*: fix go tool vet -all -shadow errors
2017-06-03 21:32:36 -07:00
0af1679b61
raftexample: load snapshot when opening WAL
...
Fix https://github.com/coreos/etcd/issues/7056 .
Previously we don't load snapshot when replaying WAL.
2016-12-30 17:28:57 -08:00
e8d06d8e4d
raftexample: confState should be saved after apply
2016-11-20 16:51:33 +08:00
e4fbf7db00
raftexample: implement Raft snapshot
2016-09-21 04:23:05 -07:00
4b83f40618
raftexample: add index fields to filter entries
2016-09-21 04:23:05 -07:00
666d555450
raftexample: add snapshotter, handle Ready in raft
2016-09-21 04:23:05 -07:00
b86e723107
contrib/raftexample: Restrict channel types
2016-07-18 17:19:54 -04:00
ef44f71da9
*: update LICENSE header
2016-05-12 20:51:48 -07:00
c09f23c46d
*: clean up bool comparison
2016-04-02 18:27:54 -07:00
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
02b24c58fd
contrib/raftexample: fix tests
...
os.Exit() on raft stop breaks out of the test fixture; instead,
monitor the error channel and exit on close
2016-02-10 11:49:13 -08:00
0cb304ec61
contrib/raftexample: fix restart path
...
The ConfChange fix crashes WAL replay because it assumed the node
always exists. Additionally, restart on a single node cluster
would deadlock because it had the wrong raft HardState.
To fix, replay path now goes through the regular raft loop.
Fixes #4474
2016-02-10 11:49:13 -08:00
7c0b6d9be9
contrib/raftexample: Allow nodes to be added to a running cluster
...
A node with ID n can be added by POSTing the new node's URL to /n on the
HTTP server.
2016-02-08 10:51:06 -07:00
7d862960cc
contrib/raftexample: Add a channel for proposing config changes
...
Add a channel over which we can propose cluster config changes to
raft. In an upcoming commit we'll add an HTTP endpoint that sends config
changes over this channel.
2016-02-08 10:51:06 -07:00