Alex Crawford
d9ad6aa2a9
*: update to use IANA-assigned ports
2015-04-06 13:49:43 -07:00
Yicheng Qin
0d88e0d111
rafthttp: introduce msgappv2 stream format
...
msgappv2 stream is used to send all MsgApp, and replaces the
functionality of msgapp stream. Compared to v1, it has several
advantanges:
1. The output message is exactly the same with the input one, which
cannot be done in v1.
2. It uses one connection to stream persistently, which prevents message
reorder and saves the time to request stream.
3. It transmits 10 addiontional bytes in the procedure of committing one
proposal, which is trivia for idle time.
4. It transmits less bytes when committing mutliple proposals or keep
committing proposals.
2015-04-03 17:08:56 -07:00
Yicheng Qin
40197f0698
etcdserver: not apply stale conf change in cluster and transport
2015-03-27 12:53:34 -07:00
Yicheng Qin
d9cb77aad5
rafthttp: report snapshot failure when dropping MsgSnap
2015-03-12 13:06:43 -07:00
Yicheng Qin
e41cbeda5d
rafthttp: drop messages in channel when disconnection
...
The messages in channel are outdated, and there is no need to send
them in the future. It also reports unreachable if there are messages
in the channel.
2015-03-11 14:42:06 -07:00
Yicheng Qin
a230003255
rafthttp: report unreachable when dropping messages
2015-03-11 14:11:41 -07:00
Xiang Li
b1ff6ddd88
Merge pull request #2446 from xiang90/apply-routine
...
etcdserver: separate apply and raft routine
2015-03-10 18:40:52 -07:00
Xiang Li
d015610da5
etcdserver: separate apply and raft routine
2015-03-10 13:34:24 -07:00
Yicheng Qin
51397a6423
rafthttp: use go-routine for MsgProp processing
...
MsgProp process is blocking when there is no leader, which blocks the peer
loop totally.
2015-03-09 14:11:16 -07:00
Xiang Li
8e76ccf979
Merge pull request #2439 from xiang90/metrics
...
Metrics
2015-03-05 15:55:34 -08:00
Xiang Li
a32abdbb0f
rafthttp: make metrics naming consistent
2015-03-04 16:12:53 -08:00
Xiang Li
ab33c068b7
rafthttp: record the number of failed messages
2015-03-04 16:09:50 -08:00
Yicheng Qin
933ab1e4f7
rafthttp: peer.newURLc -> peer.newURLsC
2015-03-04 15:00:47 -08:00
Yicheng Qin
0fe9861197
rafthttp: support multiple peer urls
2015-03-04 15:00:07 -08:00
Xiang Li
17aa3cf7db
rafthttp: add metrics for sending message
2015-03-04 11:18:16 -08:00
Xiang Li
c7146bd5f2
Merge pull request #2421 from xiang90/cleanup-rafthttp
...
Cleanup rafthttp
2015-03-03 22:35:01 -08:00
Xiang Li
44e53953c9
rafthttp: add comments for Transporter interface
2015-03-03 22:34:47 -08:00
Xiang Li
cb105c626c
rafthttp: kill connection timeout TODO
2015-03-03 09:49:01 -08:00
Kelsey Hightower
3a132ad8ef
Merge pull request #2413 from xiang90/refactor-peer
...
rafthttp: add comment for timeout
2015-03-03 06:40:24 -08:00
Yicheng Qin
1271b01069
Merge pull request #2406 from yichengq/333
...
rafthttp: add functional tests
2015-03-02 22:51:55 -08:00
Xiang Li
115b045505
rafthttp: add comment for timeout
2015-03-02 16:52:19 -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
fc2d7019e5
rafthttp: {nopProcessor, errProcessor} -> fakeRaft
2015-03-02 13:31:56 -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
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
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
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
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
7bf615aee0
*: drop old metrics pkg
2015-02-28 11:16:41 -08:00
Yicheng Qin
d8a9e11e22
rafthttp: extract pipeline from peer
2015-02-28 11:06:11 -08:00
Xiang Li
99840c9697
*: cleanup import
2015-02-28 10:12:35 -08:00
Xiang Li
9b6fcfffb6
*: replace our own metrics with codahale/metrics
2015-02-28 10:11:53 -08:00
Yicheng Qin
ca390560f9
rafthttp: fix panic on receiving empty ents
...
2.0 rc may send empty ents. Fix it for backward compatibility.
2015-02-20 15:07:27 -08:00
Xiang Li
c16cc3a6a3
etcdserver: recover transport when recovering from a snapshot
2015-02-13 10:16:28 -08:00
Amit Gupta
317e57a8a8
rafthttp: Panic informatively when removing unknown peer ID
2015-02-12 14:43:44 -08:00
Xiang Li
58112c4d2d
rafthttp: remove follower from leaderstats when it is removed from the cluster
2015-02-10 11:22:33 -08:00
Yicheng Qin
96fde55a0f
rafthttp: not send 0-entry MsgApp using stream
...
It is not sent out because it is useless to let remote raft step the
message.
Moreover, MsgApp stream reader can always assume that the length
of entries sent is > 0.
2015-02-10 00:02:22 -08:00
Brandon Philips
a4c4027dc7
rafthttp: becomes -> became in log line
...
Simple grammar fix.
2015-02-04 21:28:23 -08:00