Xiang Li
ddd9cb7345
raft: add TestUnstableTruncateAndAppend
2014-12-03 16:37:19 -08:00
Xiang Li
a36d07047a
Merge pull request #1844 from xiang90/testunstable
...
Testunstable
2014-12-03 13:47:28 -08:00
Xiang Li
8074a5b5a4
raft: fix error message format in test
2014-12-03 13:36:47 -08:00
Xiang Li
37ab463e86
raft: add TestUnstableStableTo
2014-12-03 13:26:35 -08:00
Xiang Li
7703d4942c
raft: add TestUnstableRestore
2014-12-03 13:03:56 -08:00
Xiang Li
be60c88603
Merge pull request #1842 from xiang90/unstable_test
...
raft: add TestUnstableFirstIndex
2014-12-03 11:50:39 -08:00
Xiang Li
256e51874e
Merge pull request #1843 from yichengq/248
...
raft: print out term in decimal format
2014-12-03 11:34:55 -08:00
Yicheng Qin
63ed202db6
raft: print out term in decimal format
2014-12-03 11:33:51 -08:00
Xiang Li
48f75ca645
raft: add TestUnstableMaybeTerm
2014-12-03 11:30:59 -08:00
Xiang Li
058356d9bd
raft: add TestUnstableLastIndex
2014-12-03 11:11:31 -08:00
Xiang Li
98ebfa3468
raft: add TestUnstableFirstIndex
2014-12-03 11:11:11 -08:00
Yicheng Qin
70bd26a652
Merge pull request #1815 from ravigadde/patch-1
...
docs: add etcd-lock into libraries-and-tools.md
2014-12-02 22:45:52 -08:00
ravigadde
16f9fd63ab
doc: add etcd-lock into libraries-and-tools.md
...
Lock implementation for etcd. It has three go routines:
a) acquire - loop that watches for the lock to be free and tries to acquire it.
b) watch - to watch for lock changes
c) refresh - to refresh the ttl when the lock is acquired
All the changes in lock ownership are notified on the events channel. Any feedback welcome!
2014-12-02 22:39:06 -08:00
Yicheng Qin
23b32a6cbe
Merge pull request #1716 from yichengq/225
...
raft: panic if loaded commit is out of range
2014-12-02 22:14:12 -08:00
Yicheng Qin
7305451d43
Merge pull request #1825 from yichengq/242
...
wal: not return ErrIndexNotFound in ReadAll
2014-12-02 22:11:49 -08:00
Yicheng Qin
38768e5396
raft: panic if loaded commit is out of range
2014-12-02 22:09:34 -08:00
Xiang Li
7e01c02abb
Merge pull request #1837 from xiang90/fix_restore
...
raft: do not restore snapshot if local raft has longer matching history
2014-12-02 21:48:43 -08:00
Xiang Li
b3841afcc3
raft: do not restore snapshot if local raft has longer matching history
...
Raft should not restore the snapshot if it has longer matching history.
Or restoring snapshot might remove the matched entries.
2014-12-02 21:34:14 -08:00
Xiang Li
e07e2ac124
Merge pull request #1836 from xiang90/panic_slice
...
raft: panic on bad slice
2014-12-02 17:48:34 -08:00
Xiang Li
3209fd544b
raft: panic on bad slice
2014-12-02 17:48:03 -08:00
Xiang Li
79014556e9
Merge pull request #1831 from xiang90/fix_unstable
...
raft: fix unstable
2014-12-02 14:43:11 -08:00
Xiang Li
2f5b748a90
raft: clearify that the firstIndex might not be available.
2014-12-02 14:27:52 -08:00
Yicheng Qin
1c7b9317a9
Merge pull request #1833 from yichengq/244
...
raft: not call stableTo for restored snapshot
2014-12-02 13:20:39 -08:00
Yicheng Qin
551a56fb98
raft: not call stableTo for restored snapshot
...
Stable has been set when restoring the snapshot in raftlog, so we don't need
to set it after advance.
2014-12-02 13:10:35 -08:00
Xiang Li
b7ca56e3c8
raft: move good case of truncateAndAppend to the first place
2014-12-02 13:05:55 -08:00
Xiang Li
3cadaca1a3
Merge pull request #1830 from xiang90/raft_snap_log
...
raft: log snapshot events
2014-12-02 12:06:15 -08:00
Xiang Li
411063e14f
raft: log snapshot events
2014-12-02 11:57:10 -08:00
Xiang Li
99c2e905e2
Merge pull request #1829 from xiang90/raft_index
...
raft: use index in entry
2014-12-02 10:42:55 -08:00
Xiang Li
788d1e59a2
raft: use index in entry
2014-12-02 10:25:27 -08:00
Yicheng Qin
70b501d17c
Merge pull request #1824 from yichengq/241
...
etcdserver: close idle connections when stop sendhub
2014-12-02 10:12:45 -08:00
Xiang Li
6692a8060e
Merge pull request #1823 from xiang90/raft_log
...
raft: logging state change events and events on bad path
2014-12-02 10:10:08 -08:00
Xiang Li
51de095d2c
raft: logging state change events and events on bad path
2014-12-02 10:08:19 -08:00
Xiang Li
f02eae934b
Merge pull request #1827 from lamielle/doc-whitespaces
...
doc: uses spaces consistently in sample JSON
2014-12-02 07:44:03 -08:00
Alan LaMielle
2b7af3d101
doc: uses spaces consistently in sample JSON
...
Replaces spurious uses of tabs with four spaces. Removes strange
unicode space character with standard space character.
2014-12-02 06:43:07 -08:00
Yicheng Qin
aa61009560
wal: not return ErrIndexNotFound in ReadAll
...
This IndexNotFound case is reasonable now because we don't write dummy
entries into wals any more.
2014-12-02 00:28:54 -08:00
Yicheng Qin
fa292391d8
etcdserver: close idle connections when stop sendhub
2014-12-02 00:08:47 -08:00
Yicheng Qin
f34fe6e4ae
Merge pull request #1819 from yichengq/239
...
integration: use timeout transport when launching cluster
2014-12-01 23:00:28 -08:00
Xiang Li
cb74b6812b
Merge pull request #1820 from xiang90/fix_storage
...
raft: fix memory storage
2014-12-01 21:25:17 -08:00
Xiang Li
312db7f0f3
raft: fix memory storage
...
Memory storage should append all entries that have greater index
than the snap.Matedata.Index. We first truncate the old parts of
incoming entries. Then truncate the existing entries in the storage.
At last, we append the incoming entries to the existing entries.
2014-12-01 16:37:16 -08:00
Yicheng Qin
7a1d147795
integration: use timeout transport when launching cluster
...
This makes it do the same behavior as etcdmain does.
2014-12-01 16:26:27 -08:00
Xiang Li
19ccdbee18
Merge pull request #1806 from xiang90/no_copy
...
No copy
2014-12-01 13:15:13 -08:00
Xiang Li
7beac083ff
Merge pull request #1810 from xiang90/purge
...
*: support purging old wal/snap files
2014-12-01 12:05:05 -08:00
Xiang Li
d3db010190
*: support purging old wal/snap files
2014-12-01 11:50:17 -08:00
Xiang Li
92d4112feb
Merge pull request #1809 from xiang90/unstable
...
raft: stableTo checks term matching
2014-12-01 11:09:40 -08:00
Xiang Li
649176934a
raft: add tests for stableTo
2014-12-01 10:54:34 -08:00
Xiang Li
7c47decd19
Merge pull request #1813 from xiang90/snap_event_log
...
etcdserver: log snapshot event
2014-11-30 12:11:23 -08:00
Xiang Li
bc5acd3c42
etcdserver: log snapshot event
2014-11-30 12:10:20 -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
d214e87aee
raft: make unstable.entries immutable; copy the entries at bad path
2014-11-27 19:35:03 -08:00
Xiang Li
d244e3bf6e
raft: fix node bench
2014-11-26 23:07:35 -08:00