21987c8701
raft: remove raftLog.resetUnstable and resetNextEnts
...
These methods are no longer used outside of tests and are redundant with
the new stableTo and appliedTo methods.
2014-11-06 17:18:00 -05:00
0d7c43d885
*: add a Advance interface to raft.Node
...
Node set the applied to committed right after it sends out Ready to application. This is not
correct since the application has not actually applied the entries at that point. We add a
Advance interface to Node. Application needs to call Advance to tell raft Node its progress.
Also this change can avoid unnecessary copying when application is still applying entires but
there are more entries to be applied.
2014-11-05 15:04:14 -08:00
421d5fbe72
raft: add tests based on section 5.3 in raft paper
2014-10-31 16:32:34 -07:00
738da2b3fa
raft: fix a incorrect in testMaybeAppend
2014-10-29 14:57:39 -07:00
74c257f63d
Merge pull request #1419 from xiangli-cmu/raft_log_test
...
raft: add test for findConflict
2014-10-27 14:30:36 -07:00
460d6490ba
raft: address issues in comments
2014-10-27 14:20:42 -07:00
94f701cf95
raft: refactor isUpToDate and add a test
2014-10-25 20:34:14 -07:00
8cd95e916d
raft: comments for isUpToDate
2014-10-25 20:12:54 -07:00
86c66cd802
raft: remove unused code
2014-10-25 19:56:13 -07:00
90f26e4a56
raft: add test for findConflict
2014-10-25 18:58:11 -07:00
09e9618b02
raft: change raftLog.maybeAppend to return the last new index
...
As per @unihorn's comment on #1366 , we change raftLog.maybeAppend to
return the last new index of entries in maybeAppend.
2014-10-23 15:42:47 -04:00
e200d2a8e2
etcdserver/raft: remove msgDenied, removedNodes, shouldStop
...
The future plan is to do all these in etcdserver level.
2014-10-20 15:13:18 -07:00
7a4d42166b
*: add license header to all source files
2014-10-17 15:41:22 -07:00
fc42bdb904
raft: remove unused compactThreshold
2014-10-16 17:11:10 -07:00
af5b8c6c44
raft: int64 -> uint64
2014-10-09 14:26:43 +08:00
7b61565c0a
raft: save removed nodes in snapshot
2014-10-08 15:33:55 +08:00
b3c1bd5616
raft: commitIndex=min(leaderCommit, index of last new entry)
2014-09-29 14:38:17 -07:00
ab61a8aa9a
*: init for on disk snap support
2014-09-17 13:56:12 -07:00
140fd6d6c4
raft: restart using last written entry also
2014-09-15 09:56:33 -07:00
a9af70c52b
raft: write entry 0 into log
2014-09-15 09:55:52 -07:00
072a21782e
Merge pull request #1049 from unihorn/120
...
raftLog: enhance check in compact
2014-09-12 11:35:41 -07:00
d31443f5a3
raftLog: compact applied entries only
...
compact MUST happen on entries that have been applied, or
1. it may screw up the log by setting wrong commitIndex
2. discard unapplied entries
2014-09-12 11:34:08 -07:00
3bc4b2db12
raft: log comment grammar fix
2014-09-11 13:59:50 -07:00
eaffaacf5e
raft: do not need to copy committed entries
2014-09-09 14:09:30 -07:00
9997c9488a
*: fix a few small issues identified by go vet
2014-09-08 23:52:36 -07:00
8d9b7b1680
raft: remove entry type
2014-09-03 15:24:47 -07:00
8463421448
raft: remove configuration
2014-09-03 15:23:05 -07:00
e8e588c67b
raft: move protobufs into raftpb
2014-09-03 09:20:17 -07:00
ddd219f297
many: marshal message
2014-09-03 09:20:16 -07:00
4aa15294a8
raft: re-remove clusterId from raft
2014-09-03 09:20:14 -07:00
134a962222
raft: move raft2 to raft
2014-09-03 09:20:14 -07:00
0453d09af6
raft: moved into new raft
2014-09-03 09:20:11 -07:00
f03c3bce05
raft: seperate dequeuing from slicing
2014-09-03 09:20:11 -07:00
a28dc4559b
raft/etcd: recover node
2014-09-03 09:20:10 -07:00
a5df254e53
raft: add clusterId to snapshot
2014-09-03 09:20:08 -07:00
ba63cf666d
raft: add recover
2014-09-03 09:20:02 -07:00
6030261363
etcd/raft: add snap
2014-09-03 09:20:02 -07:00
38ec659cd6
raft: make Entry a protobuf type
2014-09-03 09:20:01 -07:00
54b4f52e48
raft: add index to entry
2014-09-03 09:20:01 -07:00
b383cd5acf
raft: refactor recover
2014-09-03 09:19:59 -07:00
e850c644da
raft: return offset for unstableEnts
2014-09-03 09:19:58 -07:00
609e13a240
raft: add node.Unstable
...
Be able to return all unstable log entries. Application must store unstable
log entries before send out any messages after calling step.
2014-09-03 09:19:58 -07:00
1288e1f39d
raft: log->raftlog
2014-09-03 09:19:58 -07:00
c7d1beaaa5
raft: add first level logging
...
We log the message to step and the state of the statemachine before and after
stepping the message.
2014-09-03 09:19:58 -07:00
2665cc1cc8
raft: heartbeat should not contain entries
2014-09-03 09:19:57 -07:00
060de128a7
raft: add clusterId
2014-09-03 09:19:56 -07:00
447d7dc51b
raft: fix log append; add tests
2014-09-03 09:19:49 -07:00
30f4d9faea
raft: change index and term to int64
2014-09-03 09:05:14 -07:00
2a11c1487c
raft: sm.compact and sm.restore
2014-09-03 09:05:12 -07:00
064004b899
raft: add log compact
2014-09-03 09:05:12 -07:00