Commit Graph

4732 Commits (7fe608532a67bb93cb7061852e5492c053a370e8)

Author SHA1 Message Date
Yicheng Qin 1271b01069 Merge pull request #2406 from yichengq/333
rafthttp: add functional tests
2015-03-02 22:51:55 -08:00
Xiang Li e50d43fd32 pkg/transport: set the maxIdleConnsPerHost to -1
for transport that are using timeout connections, we set the
maxIdleConnsPerHost to -1. The default transport does not clear
the timeout for the connections it sets to be idle. So the connections
with timeout cannot be reused.
2015-03-02 21:52:03 -08:00
Xiang Li 115b045505 rafthttp: add comment for timeout 2015-03-02 16:52:19 -08:00
Xiang Li 24fbad7bd8 Merge pull request #2412 from xiang90/refactor-peer
rafhttp: refactor peer.go
2015-03-02 16:24:35 -08:00
Xiang Li 88bde91716 rafhttp: refactor func peer.pick in peer.go 2015-03-02 15:17:14 -08:00
Yicheng Qin 81c67eed9c rafthttp: add functional tests 2015-03-02 14:22:20 -08:00
Yicheng Qin 4dd3be0f05 Merge pull request #2401 from yichengq/331
rafthttp: add unit tests and SendMsgApp benchmark
2015-03-02 13:55:16 -08:00
Yicheng Qin fc2d7019e5 rafthttp: {nopProcessor, errProcessor} -> fakeRaft 2015-03-02 13:31:56 -08:00
Yicheng Qin ee8325d62c test: not run race test on rafthttp pkg 2015-03-02 13:30:34 -08:00
Yicheng Qin f59b60671e rafthttp: add peer tests 2015-03-02 13:30:30 -08:00
Yicheng Qin 45d6b76eea rafthttp: add stream tests 2015-03-02 13:29:05 -08:00
Yicheng Qin 8ec28f27d1 rafthttp: streamReader roundtrip -> dial 2015-03-02 13:26:48 -08:00
Yicheng Qin a299f68e09 rafthttp: add transport benchmark test 2015-03-02 13:25:32 -08:00
Yicheng Qin 9d445d2fcf rafthttp: add transport tests 2015-03-02 13:25:30 -08:00
Yicheng Qin 399e3cdf81 rafthttp: add stream http tests 2015-03-02 13:24:50 -08:00
Yicheng Qin 31666cdbff Merge pull request #2408 from yichengq/335
rafthttp: report MsgSnap status
2015-03-02 09:43:08 -08:00
Yicheng Qin b4b9b9118a rafthttp: report MsgSnap status 2015-03-02 09:38:11 -08:00
Yicheng Qin 78aa251ab2 rafthttp: only use pipeline to send MsgSnap
The size of MsgSnap may be very big, e.g., 1G.
If its size is big and general streaming is used to send it, it may block
the following messages for several ten seconds, which interrupts the
heartbeat heavily.
Only use pipeline to send MsgSnap.
2015-03-02 09:35:54 -08:00
Yicheng Qin 9989bf1d36 Merge pull request #2407 from yichengq/334
rafthttp: report unreachable status of the peer
2015-03-02 09:35:35 -08:00
Brandon Philips dcd125e7a6 Merge pull request #2382 from philips/add-faq
Documentation: add implementation faq
2015-03-01 20:24:50 -08:00
Yicheng Qin 9b986fb4c1 rafthttp: report unreachable status of the peer
When it failed to send message to the remote peer, it reports unreachable
to raft.
2015-03-01 16:48:26 -08:00
Yicheng Qin 09f181f585 raft: log unreachable remote node 2015-03-01 16:47:49 -08:00
Xiang Li dfa625407f Merge pull request #2400 from xiang90/rm_acl
acl: remove acl pkg
2015-03-01 15:28:58 -08:00
Xiang Li 199c1eaab6 Merge pull request #2403 from xiang90/keep_entries
etcdserver: keep a min number of entries in memory
2015-03-01 10:18:21 -08:00
Xiang Li 428b77afc3 etcdserver: keep a min number of entries in memory
Do not aggressively compact raft log entries. After a snapshot,
etcd server can compact the raft log upto snapshot index. etcd server
compacts to an index smaller than snapshot to keep some entries in memory.
The leader can still read out the in memory entries to send to a slightly
slow follower. If all the entries are compacted, the leader will send the
whole snapshot or read entries from disk if possible.
2015-03-01 10:12:13 -08:00
Xiang Li a4018f25c9 Merge pull request #2405 from mikael84/patch-1
Documentation: fix "Missing infra1="
2015-02-28 21:48:01 -08:00
Mikael Kjaer 22c8d781ef Documentation: fix "Missing infra1="
Documentation: fix "Missing infra1="
2015-03-01 09:44:25 +04:00
Xiang Li 6d81009b26 acl: remove acl pkg 2015-02-28 15:02:47 -08:00
Yicheng Qin fbd5c81139 raft: remove shadowing of variables from test 2015-02-28 12:09:33 -08:00
Xiang Li d459ae0df3 store: remove unused ACL field 2015-02-28 11:46:21 -08:00
Xiang Li a4dab7ad75 *: do not block etcdserver when encoding store into json
Encoding store into json snapshot has quite high CPU cost. And it
will block for a while. This commit makes the encoding process non-
blocking by running it in another go-routine.
2015-02-28 11:41:58 -08:00
Xiang Li 9b4d52ee73 raft: do not resend snapshot if not necessary
raft relies on the link layer to report the status of the sent snapshot.
If the snapshot is still sending, the replication to that remote peer will
be paused. If the snapshot finish sending, the replication will begin
optimistically after electionTimeout. If the snapshot fails, raft will
try to resend it.
2015-02-28 11:41:58 -08:00
Xiang Li 2185ac5ac8 raft: cleanup unreachable 2015-02-28 11:35:16 -08:00
Yicheng Qin eeaf12beb1 rafthttp: use /raft/stream for MsgApp stream
New rafthttp uses /raft/stream/msgapp for MsgApp stream, but v2.0 rafthttp
cannot understand it. Use the old endpoint /raft/stream instead for backward
compatibility, and plan to move to new endpoint in the version after the
next one.
2015-02-28 11:35:16 -08:00
Yicheng Qin 758ff26dd8 rafthttp: add copyright header 2015-02-28 11:35:16 -08:00
Yicheng Qin 1fdbbb959f rafthttp: add util, msgapp, message test 2015-02-28 11:35:16 -08:00
Yicheng Qin dee3001086 rafthttp: add back tests that commentted out 2015-02-28 11:35:16 -08:00
Yicheng Qin 87e3de8b8b integration: fix decrease cluster tests 2015-02-28 11:35:16 -08:00
Yicheng Qin 1c5a507761 rafthttp: refactor peer and add general stream 2015-02-28 11:35:16 -08:00
Yicheng Qin 2c94e2d771 *: make dial timeout configurable
Dial timeout is set shorter because
1. etcd is supposed to work in good environment, and the new value is long
enough
2. shorter dial timeout makes dial fail faster, which is good for
performance
2015-02-28 11:18:59 -08:00
Yicheng Qin 55cd03ff4b rafthttp: add run loop for peer 2015-02-28 11:18:59 -08:00
Xiang Li 86429264fb wal: support auto-cut in wal
WAL should control the cut logic itself. We want to do falloc to
per allocate the space for a segmented wal file at the beginning
and cut it when it size reaches the limit.
2015-02-28 11:18:59 -08:00
Xiang Li c3d3ad931b snap: add save latency metrics 2015-02-28 11:16:42 -08:00
Xiang Li 95bba154d6 etcdserver: add propose summary 2015-02-28 11:16:42 -08:00
Xiang Li 83c953b153 etcdhttp: move /stats to /debug/vars 2015-02-28 11:16:42 -08:00
Xiang Li a776064a8b etcdmain: fix godeps on osx 2015-02-28 11:16:41 -08:00
Xiang Li 7bf615aee0 *: drop old metrics pkg 2015-02-28 11:16:41 -08:00
Xiang Li 84485643fe *: expose wal metrics at /metrics 2015-02-28 11:06:11 -08:00
Xiang Li fb1a28c65d *: vendor prometheus 2015-02-28 11:06:11 -08:00
Yicheng Qin d8a9e11e22 rafthttp: extract pipeline from peer 2015-02-28 11:06:11 -08:00