Yicheng Qin
394893ff92
server: not set participant status for peer that points to itself
2014-09-03 09:20:03 -07:00
Yicheng Qin
01fdaea8a6
server: not create new peer if exists
2014-09-03 09:20:03 -07:00
Yicheng Qin
434bf8ca81
server: rewrite keepSetting in TestMultiNodeKillOne
...
It avoids blocking http request.
2014-09-03 09:20:03 -07:00
Yicheng Qin
b1426e2635
server: wait for entries to be committed in TestClusterConfigReload
2014-09-03 09:20:03 -07:00
Xiang Li
659eb5fd2a
wal: make record a protobuf type
2014-09-03 09:20:03 -07:00
Yicheng Qin
d0dc7427dd
server: serve /v2/admin on raftPubAddr
2014-09-03 09:20:03 -07:00
Xiang Li
8e06333d45
raft: make State a protobuf type
2014-09-03 09:20:03 -07:00
Xiang Li
b9e7c20a4c
etcd: make cmd a protobuf type
...
Conflicts:
etcd/v2_apply.go
etcd/v2_store.go
2014-09-03 09:20:03 -07:00
Xiang Li
d6c3ebb1a0
raft: make Info a protobuf type
2014-09-03 09:20:03 -07:00
Yicheng Qin
a191df10a3
server: p.Get -> p.QuorumGet
2014-09-03 09:20:03 -07:00
Yicheng Qin
cd4b35c841
server: add QuorumGet
2014-09-03 09:20:02 -07:00
Yicheng Qin
5ffc0adccc
server: participant.Get -> participant.Store.Get
2014-09-03 09:20:02 -07:00
Yicheng Qin
3529c381cf
server: add TODO for /v2/stats
2014-09-03 09:20:02 -07:00
Yicheng Qin
4b3c3203ff
server: stop timer when exit
2014-09-03 09:20:02 -07:00
Yicheng Qin
4f10917ce9
etcd: add a read/write timeout to server
...
The default is for connections to last forever[1]. This leads to fds
leaking. I set the timeout so high by default so that watches don't have
to keep retrying but perhaps we should set it slower.
Tested on a cluster with lots of clients and it seems to have relieved
the problem.
[1] https://groups.google.com/forum/#!msg/golang-nuts/JFhGwh1q9xU/heh4J8pul3QJ
Original Commit: 084dcb5596d52a3a1386d59acced24286137e385
From: philips <brandon@ifup.org>
2014-09-03 09:20:02 -07:00
Yicheng Qin
e587402c26
server: Flush headers when using wait=true and stream=true
...
Many http clients will missbehave unless they get an initial http-
response, even when long-polling. It also saves the user/client from
having to handle headers on the first action of the watch, but rather
handle the response immediately.
Original commit: 2338481bb1d5ab3af95188d21db70512b03ccf38
From: Christoffer Vikström
2014-09-03 09:20:02 -07:00
Yicheng Qin
431ff3cce1
raft: minor change on code
2014-09-03 09:20:02 -07:00
Yicheng Qin
7c3e202c94
etcd: add recover
2014-09-03 09:20:02 -07:00
Yicheng Qin
15029381e1
raft: fix promotable
2014-09-03 09:20:02 -07:00
Yicheng Qin
01c40fcf50
raft: not recover from outdated snapshot
2014-09-03 09:20:02 -07:00
Yicheng Qin
ba63cf666d
raft: add recover
2014-09-03 09:20:02 -07:00
Xiang Li
6030261363
etcd/raft: add snap
2014-09-03 09:20:02 -07:00
Yicheng Qin
943fede19c
server: panic when fail to save in wal
2014-09-03 09:20:01 -07:00
Yicheng Qin
2d870fa65b
wal: add first level logging
2014-09-03 09:20:01 -07:00
Yicheng Qin
969b529b08
wal: fix O_RDONLY attr when opening old file
2014-09-03 09:20:01 -07:00
Xiang Li
38ec659cd6
raft: make Entry a protobuf type
2014-09-03 09:20:01 -07:00
Yicheng Qin
193679e041
server: wait longer in afterTest
...
Because we sets dial timeout to be 200ms, afterTest should wait
> 200ms.
2014-09-03 09:20:01 -07:00
Yicheng Qin
7bb6230588
peerHub: add response timeout for http client
2014-09-03 09:20:01 -07:00
Yicheng Qin
069a288a59
peer: wait a little before closing idle connections
...
It seems that it needs some time to set connections that just used
as idle.
2014-09-03 09:20:01 -07:00
Xiang Li
611d564865
raft: remove unused prevTerm field
2014-09-03 09:20:01 -07:00
Xiang Li
43c9ca895b
wal: fix append entry
2014-09-03 09:20:01 -07:00
Xiang Li
54b4f52e48
raft: add index to entry
2014-09-03 09:20:01 -07:00
Xiang Li
46eab903e9
etcd: do not generate id if next state is stop
2014-09-03 09:20:01 -07:00
Yicheng Qin
0197ce4c66
server: move TestMultiNodeKillAllAndRecovery to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
215820dd40
server: move TestMultiNodeKillOne to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
a0fbc289ec
server: move discovery tests to etcd/
...
TestDiscoveryDownNoBackupPeersWithDataDir -> TestRunByDataDir
remove TestDiscoveryRestart
2014-09-03 09:20:00 -07:00
Yicheng Qin
5283002132
server: set short dial timeout for raft communication
2014-09-03 09:20:00 -07:00
Yicheng Qin
28634fce47
wal: Flush -> Sync
2014-09-03 09:20:00 -07:00
Yicheng Qin
2b0936271c
server: fix 2nd watch timeout in TestSingleNodeRecovery
...
When recovering from data dir, the node needs election timeout to
elect itself to be the leader.
2014-09-03 09:20:00 -07:00
Yicheng Qin
01322cd243
server: move TestClusterConfigReload to etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
21fb7b4fbb
server: improve TestKillLeader and TestKillRandom
...
Remove testing on 11-node cluster due to lack of fds
2014-09-03 09:20:00 -07:00
Yicheng Qin
efaef49734
server: move TestSingleNodeRecovery under etcd/
2014-09-03 09:20:00 -07:00
Yicheng Qin
ffa5eb08c3
server: apply ents when loading log
2014-09-03 09:20:00 -07:00
Yicheng Qin
a6132d459f
server: save correct nodeId for participant
2014-09-03 09:20:00 -07:00
Xiang Li
12dd380d26
etcd: use tmpDir as testing directory
2014-09-03 09:20:00 -07:00
Xiang Li
653a63fa00
etcd: add destoryCluster for testing
2014-09-03 09:19:59 -07:00
Yicheng Qin
88e5bce63d
wip: wal glue
2014-09-03 09:19:59 -07:00
Xiang Li
d70df4a15d
wal: reorgnize wal file
2014-09-03 09:19:59 -07:00
Xiang Li
a25cd45876
wal: add CoreOS copyright
2014-09-03 09:19:59 -07:00
Xiang Li
b383cd5acf
raft: refactor recover
2014-09-03 09:19:59 -07:00