Commit Graph

4041 Commits (dcf34c0ab4619f401bd72b31fa98b8288c80fec9)

Author SHA1 Message Date
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
Wes Morgan 57b076f710 build: statically compile etcdctl binary 2014-12-02 10:24:05 -05: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
Xiang Li fe0bc4ff36 Merge pull request #1805 from xiang90/fix_raft_b
raft: fix start term
2014-11-26 21:41:38 -08:00
Xiang Li 746c66b466 raft: fix start term 2014-11-26 21:21:13 -08:00
junxu 43d6f9f964 Update etcd.go
etcdmain: Fix misuse "-addr" flag

In code, it uses "-advertise-client-urls" or "-addr" flags to get the list of this member's peer URLs, 
It should be using "-peer-addr" flag instead of "-addr" flag.
2014-11-27 10:38:47 +08:00
Xiang Li 35cf7b5a31 Merge pull request #1800 from xiang90/unstable
raft: move unstable related function to log_unstable.go
2014-11-26 16:12:43 -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 416b799ecf Merge pull request #1788 from yichengq/233
rafthttp: increase the size of streaming buffer
2014-11-26 15:22:28 -08:00
Yicheng Qin 00ce0702b9 rafthttp: increase the size of streaming buffer
Streaming buffer is used for:
1. hand over data to io goroutine in non-blocking way
2. hold pressure for temprorary network delay
3. be able to wait on I/O instead of data coming under high throughput

The old 1024 value is too small and is very likely to be full and
break the streaming when suffering temprorary network delay.
2014-11-26 14:46:52 -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