Yicheng Qin
ca32a5fe9b
Merge pull request #1860 from yichengq/249
...
integration: fix possible early fire in TestWatch
2014-12-04 14:48:39 -08:00
Yicheng Qin
356146b5a0
integration: fix possible early fire in TestWatch
2014-12-04 14:34:20 -08:00
Xiang Li
a47690dd30
Merge pull request #1845 from xiang90/testunstable
...
raft: add TestUnstableTruncateAndAppend
2014-12-04 11:03:37 -08:00
Xiang Li
4ebd3a0b10
Merge pull request #1852 from xiang90/heartbeat
...
raft: add msgHeartbeat type
2014-12-04 10:25:46 -08:00
Yicheng Qin
72d2597f3d
Merge pull request #1854 from yichengq/247
...
integration: not check whether readloop goroutines exist
2014-12-04 10:16:04 -08:00
Xiang Li
149389cbfa
raft: add msgHeartbeat type
2014-12-04 08:29:31 -08:00
Yicheng Qin
719a634fdc
integration: not check whether readloop goroutines exist
...
Readloop goroutines may be left from time to time. Skip the check for now,
and will dig into it when we have time.
2014-12-04 00:51:31 -08:00
Yicheng Qin
e344774c10
Merge pull request #1850 from yichengq/247
...
raft: return 0 for term of compacted index
2014-12-03 17:23:32 -08:00
Yicheng Qin
34a468de36
raft: return 0 for term of compacted index
...
It is necessary to make this check because of the following case:
1. memory storage contains ents from index 0 to 50, and unstable has
ents from index 50 to 60.
2. raft receives an incoming snapshot with index 100.
3. raft restores its unstable to 100, but has not applied snapshot on memory storage.
4. raft receives an out-dated MsgApp from index 60.
5. raft finds the term of index 60 to check the match.
6. raft asks memory storage about the term of index 60 after it failed to get
it from unstable.
7. memory storage panics because it knows nothing about index 60.
2014-12-03 17:22:36 -08:00
Xiang Li
ddd9cb7345
raft: add TestUnstableTruncateAndAppend
2014-12-03 16:37:19 -08:00
Xiang Li
2c0d323318
Merge pull request #1848 from xiang90/raft_log
...
raft: fix log format in sendAppend
2014-12-03 16:15:12 -08:00
Xiang Li
2caf4f5f22
raft: fix log format in sendAppend
2014-12-03 16:11:44 -08:00
Xiang Li
a426b310fc
Merge pull request #1846 from xiang90/raft
...
raft: more logging
2014-12-03 14:59:06 -08:00
Xiang Li
06a5892a18
raft: more logging
2014-12-03 14:46:24 -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