Commit Graph

3971 Commits (29d7a2a5589bf8120ca6a17d5d74aaa0e76d1644)

Author SHA1 Message Date
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
Yicheng Qin 185d37c333 etcdserver: not load dummy entry from the wal 2014-11-24 20:51:04 -08:00
Xiang Li e3cb3d640b Merge pull request #1780 from xiang90/fix_raft_lead
raft: always check leader changes in node run loop
2014-11-24 19:29:53 -08:00
Xiang Li 9455119968 raft: always check leader changes in node run loop 2014-11-24 19:07:10 -08:00
Yicheng Qin d67eea4a7d Merge pull request #1779 from yichengq/233
rafthttp: limit the buffer for every read correctly
2014-11-24 17:44:25 -08:00
Yicheng Qin 61ce494386 rafthttp: limit the buffer for every read correctly 2014-11-24 17:39:39 -08:00
Xiang Li 65ad1f6ffd raft: attach Index to Entry in all tests 2014-11-24 17:13:47 -08:00
Xiang Li 10ebf1a335 raft: fix memoryStorage append 2014-11-24 16:36:59 -08:00
Xiang Li 2876c652ab raft: fix for go vet 2014-11-24 15:00:38 -08:00
Xiang Li d69e4dbe6d etcdserver: initial index to 1 2014-11-24 14:57:08 -08:00
Xiang Li 453133977d etcdserver: save snapshot only if the index is greater than previous snap index 2014-11-24 14:47:59 -08:00
Xiang Li 4b7af29c37 etcdserver: fix TriggerSnap test.
Sleep for millisecond to allow the server to apply the first nop and
first put separately.
2014-11-24 14:47:49 -08:00
Yicheng Qin cfb96de413 Merge pull request #1770 from yichengq/230
*: set read/write timeout for raft transport and listener
2014-11-24 14:01:57 -08:00
Yicheng Qin 1e797c1e38 rafthttp: limit the data size read from connection each time 2014-11-24 13:54:45 -08:00
Yicheng Qin 3e55834c38 *: set read/write timeout for raft transport and listener 2014-11-24 13:46:44 -08:00
Yicheng Qin ad58122e3c pkg/transport: fix dialer typo 2014-11-24 13:35:46 -08:00
Yicheng Qin 400e573013 rafthttp: log start and stop of streaming 2014-11-24 13:35:46 -08:00
Xiang Li 62a8df304a raft: fix error message in TestLogRestore 2014-11-24 11:10:02 -08:00
Xiang Li e8afdcfe0a raft: refactor testUnstableEnts 2014-11-24 10:40:38 -08:00
Xiang Li 08f156a1de etcdserver: remove extra empty line in snapshot func 2014-11-24 10:27:18 -08:00
Xiang Li 3dd4c458ca raft: refactor term in log.go 2014-11-24 10:13:56 -08:00
Xiang Li 94190286ff raft: add comment for append in unstableEntries in log.go 2014-11-24 09:05:40 -08:00
Xiang Li 0a46c70f5d raft: use empty slice in unstableEntries in log.go 2014-11-24 09:04:45 -08:00
Xiang Li bc0e72acb9 raft: clean up panic in log.go 2014-11-24 09:01:25 -08:00
Xiang Li f3cef87c69 raft: remove extra empty line in log.go 2014-11-24 08:43:34 -08:00
Xiang Li 6c8e294d20 test: longer test timeout 2014-11-24 08:37:26 -08:00
Xiang Li bdbafe2cf3 raft: use max in log.slice 2014-11-24 08:36:15 -08:00