Xiang Li
649176934a
raft: add tests for stableTo
2014-12-01 10:54:34 -08:00
Xiang Li
3c0fbe285c
raft: stableTo checks term matching
...
stableTo should only mark the index stable if the term is matched. After raft sends out unstable
entries to application, raft makes progress without waiting for reply. When the appliaction
calls the stableTo to notify the entries up to "index" are stable, raft might have truncated
some entries before "index" due to leader lost. raft must verify the (index,term) of stableTo,
before marking the entries as stable.
2014-11-28 14:13:07 -08:00
Xiang Li
7929e46dd8
raft: clean up
2014-11-26 15:31:07 -08:00
Xiang Li
8a626257c7
raft: move unstable related function to log_unstable.go
2014-11-26 15:25:24 -08:00
Yicheng Qin
7358ef21a2
Merge pull request #1799 from yichengq/237
...
integration: attempt more times to listen on specified port
2014-11-26 14:26:41 -08:00
Yicheng Qin
e03cf6d488
Merge pull request #1797 from yichengq/236
...
raft: no need to save dummy entry into stable storage
2014-11-26 14:23:32 -08:00
Yicheng Qin
670d98ec72
integration: attempt more times to listen on specified port
...
Travis is rather slow, and it may fail to listen on that port sometimes.
2014-11-26 14:21:15 -08:00
Yicheng Qin
0f070f3d2d
raft: no need to save dummy entry into stable storage
2014-11-26 14:04:56 -08:00
Xiang Li
b2d686495c
Merge pull request #1796 from xiang90/unstable
...
raft: move all unstable stuff into one struct for future cleanup
2014-11-26 13:59:07 -08:00
Xiang Li
66252c7d62
raft: move all unstable stuff into one struct for future cleanup
2014-11-26 13:36:17 -08:00
Xiang Li
488f508505
Merge pull request #1777 from xiang90/log_interface
...
Log interface
2014-11-26 12:51:37 -08:00
Yicheng Qin
ab2a40ea37
Merge branch 'log_interface'
...
Conflicts:
raft/log.go
2014-11-26 12:16:02 -08:00
Xiang Li
732cfa1ad6
raft: remove the applysnap from Storage interface
2014-11-26 11:28:51 -08:00
Xiang Li
e23f9e76d1
raft: do not applysnapshot in raft
2014-11-26 10:59:13 -08:00
Xiang Li
d01d6119e5
Merge pull request #1792 from xiang90/fix_raft_l
...
raft: always write dummy entry to storage
v0.5.0-alpha.4
2014-11-25 23:32:01 -08:00
Xiang Li
39e6631447
raft: always write dummy entry to storage
2014-11-25 23:27:40 -08:00
Yicheng Qin
7614aa53bf
version: bump to alpha.4
2014-11-25 21:41:13 -08:00
Yicheng Qin
006da2f8a0
Merge pull request #1789 from yichengq/234
...
rafthttp: only batch good MsgAppResp
2014-11-25 18:46:23 -08:00
Yicheng Qin
d5ceb26408
rafthttp: only batch good MsgAppResp
...
A MsgAppResp with Reject set should be sent back to the leader as soon
as possible instead of batching.
2014-11-25 17:53:26 -08:00
Xiang Li
8de98d4903
raft: clean up
2014-11-25 16:21:50 -08:00
Xiang Li
9bd1786fe4
raft: memory storage does not append out of date entries
2014-11-25 15:18:40 -08:00
Xiang Li
9df0e7715d
raft: do not panic on out of date compaction
2014-11-25 15:14:39 -08:00
Xiang Li
01cbcce8ba
etcdserver: do not applySnapshot twice
2014-11-25 14:53:49 -08:00
Xiang Li
74d8c7f457
etcdserver: cleanup main loop
2014-11-25 14:38:18 -08:00
Yicheng Qin
7e6e305c4f
Merge branch 'log_interface'
...
Conflicts:
raft/raft.go
2014-11-25 14:22:11 -08:00
Yicheng Qin
a13d5a70ff
etcdserver: save snapshot before entries
2014-11-25 12:39:15 -08:00
Yicheng Qin
dd57c1f189
Merge pull request #1784 from yichengq/234
...
raft: not compact log if the compact index < first index of the log
2014-11-25 11:52:01 -08:00
Yicheng Qin
4b43824be9
raft: not compact log if the compact index < first index of the log
...
It should ignore the compact operation instead of panic because the case that
the log is restored from snapshot before executing compact is reasonable.
2014-11-25 11:51:20 -08:00
Yicheng Qin
1a5333e51d
Merge pull request #1778 from yichengq/232
...
docs: add configuration doc
2014-11-25 11:16:44 -08:00
Yicheng Qin
07ca99f4d6
docs: add configuration doc
2014-11-25 11:09:29 -08:00
Xiang Li
aa2721e31d
Merge pull request #1781 from orls/fix-backup-snapshots
...
Fix backup snapshots
2014-11-25 08:59:16 -08:00
Xiang Li
c46e30412e
Merge pull request #1782 from orls/fix-forcenew-panic
...
etcdserver: Fix panic when restoring from backup (-force-new-cluster)
2014-11-25 08:58:32 -08:00
Owen Smith
dbb6a75e3f
backup: Ensure dest snapshot dir always exists
...
Otherwise the SaveSnap operation fails
2014-11-25 16:57:18 +00:00
Owen Smith
c67b937d62
etcdserver: truncate WAL from correct index when forcing new cluster
...
When loading from a backup with a snapshot and WAL, the length of WAL entries
can be lower than the current index integer value, causing a panic when
slicing off uncommitted entries. This looks for WAL entries higher than
the current index before slicing.
2014-11-25 16:46:56 +00:00
Owen Smith
9974bf0291
backup: Add fatal if dest snapshot failed
...
Errors are currently silently swallowed
2014-11-25 14:08:20 +00:00
Yicheng Qin
8aa89dba3d
raft: make if checking match the error in storage.Term
2014-11-25 00:52:13 -08:00
Yicheng Qin
8ee1bf31d6
raft: use IsEmptySnap to check the empty snapshot
2014-11-25 00:37:21 -08:00
Yicheng Qin
e466126510
raft: set snapshot to nil when it is saved
2014-11-25 00:30:22 -08:00
Yicheng Qin
e17bcd8932
raft: remove wont-fix TODO in ApplyConfChange
2014-11-25 00:10:44 -08:00
Yicheng Qin
85d0e2f130
raft: remove unused raftLog.isOutOfAppliedBounds
2014-11-25 00:07:55 -08:00
Yicheng Qin
1e0f87df8c
raft: stricter checking in raftLog.slice
2014-11-25 00:05:00 -08:00
Yicheng Qin
1d01c8aa2d
raft: remove unused raftLog.at function
2014-11-24 23:52:28 -08:00
Yicheng Qin
2c06a1d815
raft: not set applied when restore log from snapshot
...
applied is only updated by application level through Advance.
2014-11-24 23:37:47 -08:00
Yicheng Qin
0d200baf72
raft: refine raftLog.term
2014-11-24 23:27:57 -08:00
Yicheng Qin
7fcaca6d18
raft: simplify raftLog.lastIndex
2014-11-24 23:08:51 -08:00
Yicheng Qin
8670f4012b
raft: remove useless line in raftLog.append
2014-11-24 22:42:55 -08:00
Yicheng Qin
239c8dd479
raft: add comment to newLog
2014-11-24 21:47:12 -08:00
Yicheng Qin
54e1237271
etcdserver: panic when snapshot on raft storage
...
Snapshot on raft storage should always succeed. If there is an error, it must
be internal fault and needs stack info to debug.
2014-11-24 21:22:49 -08:00
Yicheng Qin
1b038da18a
etcdserver: init snapi when init appliedi
2014-11-24 21:19:30 -08:00
Yicheng Qin
bd9e93eeea
etcdserver: remove finished TODO for raftStorage.Compact
2014-11-24 21:10:53 -08:00