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
Jonathan Boulle
f1ed69e883
*: switch to line comments for copyright
...
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Brian Waldon
2120af8cfc
pkg: ioutils -> ioutil
2015-01-22 17:14:01 -08:00
Yicheng Qin
99821579bf
metrics: add /rafthttp/stream metrics
2015-01-21 13:24:21 -08:00
Yicheng Qin
84ceefbffc
rafthttp: write StatusOK before start streaming
2015-01-15 14:44:24 -08:00
Xiang Li
0c55cfb21e
Merge pull request #2036 from xiang90/trtr
...
refactor rafthttp
2015-01-05 14:08:51 -08:00
Xiang Li
1aa8f1eee6
rafthttp: clean up reader when failed
2015-01-05 12:04:25 -08:00
Xiang Li
4938e6bff5
rafthttp: a stopped peer does not accept any methods
2015-01-03 20:02:43 -08:00
Xiang Li
3319f716d9
rafthttp: a stopped stream does not accept any methods
2015-01-03 19:39:33 -08:00
Xiang Li
15be030aaa
etcdserver: collect error from errorc
2015-01-02 20:13:46 -08:00
Xiang Li
95a661251d
rafthttp: rename streamClient -> streamReader
2014-12-31 21:20:58 -08:00
Xiang Li
fe53ffd74d
rafthttp: streamserver -> streamwriter
2014-12-31 21:11:24 -08:00
Yicheng Qin
2292da15d6
rafthttp: fix stream.open call
2014-12-31 10:02:45 -08:00
Xiang Li
d2c7a7e5cb
rafthttp: remove raftPrefix
2014-12-30 13:48:07 -08:00
Xiang Li
2193b70fb3
rafthttp: add stream
2014-12-30 13:45:11 -08:00
Xiang Li
c712dd682a
rafthttp: make Transport private
2014-12-29 12:20:52 -08:00
Xiang Li
a14d13f724
rafthttp: make fields in Transport private
2014-12-29 12:08:13 -08:00
Yicheng Qin
5bb8eeb5cf
rafthttp: transport cleanup
2014-12-29 11:21:40 -08:00
Yicheng Qin
08f839e32c
rafthttp: set the API boundary of the package
2014-12-28 15:50:27 -08:00
Xiang Li
04522baeee
etcdserver: fix leader stats
2014-12-15 16:50:03 -08:00
Xiang Li
e3dbfefbe0
sender: set strmSrv to nil after stoping it
2014-12-14 20:00:32 -08:00
Xiang Li
d86603840d
rafthttp: better logging
2014-12-14 09:50:59 -08:00
Xiang Li
f2863e5279
Merge pull request #1911 from diffoperator/issue_1903
...
rafthttp: fixes issue 1903
2014-12-10 22:55:22 -08:00
Nikhil Sarda
123b3dd64c
rafthttp: fixes issue 1903
...
Record the URL being fetched in the log when we 404
2014-12-10 21:34:29 -08:00
Yicheng Qin
e89cc25c50
Merge pull request #1901 from yichengq/260
...
rafthttp: batch MsgProp
2014-12-10 21:16:07 -08:00
Yicheng Qin
8aba4caa72
rafthttp: batch MsgProp
...
If amounts of MsgProp goes to the follower, it could batch them and
forward to the leader. This can avoid dropping MsgProp in good path
due to exceed maximal serving in sender.
Moreover, batching MsgProp can increase the throughput of proposals that
come from follower.
2014-12-10 21:08:40 -08:00
Yicheng Qin
07e876592b
rafthttp: log the type of message that is dropped when sending
2014-12-10 12:50:31 -08:00
Rob Szumski
2593914973
rafthttp: feedback
2014-12-10 10:18:01 -08:00
Rob Szumski
4094812b39
rafthttp: improve start/stop logging
2014-12-09 16:57:40 -08:00
Yicheng Qin
b24d546bd0
rafthttp: increase sender buffer size
...
The buffer size is set big enough to buffer all messages generated in
one second as a follower in good path.
2014-12-07 22:35:50 -08:00
Xiang Li
88e2fab572
Merge pull request #1859 from xiang90/pause_test
...
*: add pauseMember test
2014-12-04 15:11:59 -08:00
Veres Lajos
3de2ab2c04
*: typofixes
...
https://github.com/vlajos/misspell_fixer
2014-12-04 22:51:19 +00:00