Commit Graph

27 Commits (9b8412773959d9e940c4319e88af23163e5c2fcf)

Author SHA1 Message Date
Gyu-Ho Lee 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
Vincent Lee e8d06d8e4d raftexample: confState should be saved after apply 2016-11-20 16:51:33 +08:00
Gyu-Ho Lee 113b27229b raftexample: remove snapshot TODO in README 2016-09-21 05:07:04 -07:00
Gyu-Ho Lee e4fbf7db00 raftexample: implement Raft snapshot 2016-09-21 04:23:05 -07:00
Gyu-Ho Lee 4b83f40618 raftexample: add index fields to filter entries 2016-09-21 04:23:05 -07:00
Gyu-Ho Lee 666d555450 raftexample: add snapshotter, handle Ready in raft 2016-09-21 04:23:05 -07:00
Gyu-Ho Lee 15fa8dd866 raftexample: add snapshot methods to kvstore 2016-09-21 04:23:01 -07:00
Brian Schroeder b86e723107 contrib/raftexample: Restrict channel types 2016-07-18 17:19:54 -04:00
Gyu-Ho Lee c1e3601776 raftexample: fixes from go vet, go lint 2016-06-22 12:04:15 -07:00
Anthony Romano fc7da09d67 *: add missing godoc package descriptions
Fixes #4074
2016-05-27 15:15:26 -07:00
Gyu-Ho Lee ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
Gyu-Ho Lee c09f23c46d *: clean up bool comparison 2016-04-02 18:27:54 -07:00
Anthony Romano bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Anthony Romano 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
Anthony Romano 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
Adam Wolfe Gordon ffd61c0faf contrib/raftexample: Update README to reflect dynamic configuration changes (fixes #4018) 2016-02-08 13:03:25 -07:00
Adam Wolfe Gordon 4a527be302 contrib/raftexample: Allow nodes to be removed from a running cluster
A node with ID n can be removed by DELETEing /n on the HTTP server.
2016-02-08 10:51:06 -07:00
Adam Wolfe Gordon 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
Adam Wolfe Gordon 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
Adam Wolfe Gordon eb7fef559d contrib/raftexample: Handle conf change entries
So far we don't propose conf changes, but we'll be ready to handle them
when we do.
2016-02-08 10:51:03 -07:00
Adam Wolfe Gordon a31f9a8af1 contrib/raftexample: Publish only committed entries
We shouldn't publish entries to the kvstore until they've been
committed.
2016-02-05 13:59:49 -07:00
Anthony Romano 20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
Anthony Romano 58ac6aeb5a test: activate tests on contrib/raftexample
adds contrib/raftexample to integration tests and fixes two test races
2015-12-23 11:13:37 -08:00
chz 63bc804253 contrib/raftexample: shutdown rafthttp on closed proposal channel
Otherwise listening ports leak across unit tests and ports won't bind.
2015-12-21 13:03:42 -08:00
chz b73a11ff45 contrib/raftexample: follow pipeline guidelines closer
close raft commit channel before issuing raft error since it's done
sending
2015-12-21 13:03:42 -08:00
chz b7cf2385e6 contrib/raftexample: add test, fix dead lock on proposal channel
deadlock if no leader; node selects on propc=nil and writes to Ready,
client blocks on propC in same select as Ready reader, and so progress
of raft state machine deadlocks.
2015-12-21 13:03:35 -08:00
Anthony Romano 1f858e10c8 contrib: example key-value store using raft 2015-12-17 14:41:37 -08:00