Commit Graph

27 Commits

Author SHA1 Message Date
0fc764200d rafthttp: monitor connection 2015-08-04 17:39:40 +08:00
f1e995b070 rafthttp: use leveled logger 2015-06-09 16:15:02 -07:00
c371d8c65c rafthttp: version enforcement on rafthttp messages
This PR sets etcd version and min cluster version in request header,
and let server check version compatibility. rafthttp server
will reject any message from peer with incompatible version(too low
version or too high version), and print out warning logs.
2015-06-02 13:33:18 -07:00
0d3d4c5b01 rafthttp: print out log when clusterID mismatch instead of exiting
We have heard from several users that they do not expect a clusterID
mismatch to kill the cluster.
2015-05-26 16:05:58 -07:00
38b8e848ac rafthttp: try stream msgappV1 handler if msgappV2 is unsupported
This helps etcd 2.1 connect to msgappV1 handler when the remote member
doesn't support msgappV2. And it doesn't print out unsupported handler
error to make log clean.
2015-05-26 14:52:41 -07:00
1c1cccd236 rafthttp: stop etcd if it is found removed when stream dial
The original process is stopping etcd only when pipeline message finds itself
has been removed. After this PR, stream dial has this functionality too.
It helps fast etcd stop, which doesn't need to wait for stream break to
fall back to pipeline, and wait for election timeout to send out message
to detect self removal.
2015-04-27 15:10:00 -07:00
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
399e3cdf81 rafthttp: add stream http tests 2015-03-02 13:24:50 -08:00
b4b9b9118a rafthttp: report MsgSnap status 2015-03-02 09:38:11 -08:00
1c5a507761 rafthttp: refactor peer and add general stream 2015-02-28 11:35:16 -08:00
55cd03ff4b rafthttp: add run loop for peer 2015-02-28 11:18:59 -08:00
99840c9697 *: cleanup import 2015-02-28 10:12:35 -08:00
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
2120af8cfc pkg: ioutils -> ioutil 2015-01-22 17:14:01 -08:00
84ceefbffc rafthttp: write StatusOK before start streaming 2015-01-15 14:44:24 -08:00
fe53ffd74d rafthttp: streamserver -> streamwriter 2014-12-31 21:11:24 -08:00
2193b70fb3 rafthttp: add stream 2014-12-30 13:45:11 -08:00
c712dd682a rafthttp: make Transport private 2014-12-29 12:20:52 -08:00
5bb8eeb5cf rafthttp: transport cleanup 2014-12-29 11:21:40 -08:00
08f839e32c rafthttp: set the API boundary of the package 2014-12-28 15:50:27 -08:00
61ce494386 rafthttp: limit the buffer for every read correctly 2014-11-24 17:39:39 -08:00
1e797c1e38 rafthttp: limit the data size read from connection each time 2014-11-24 13:54:45 -08:00
c0fb1c8a00 Merge pull request #1755 from bcwaldon/golang.org-deps
Switch to golang.org/x/net/context
2014-11-20 16:26:14 -08:00
9d53b94546 rafthttp: add streaming server and client 2014-11-20 11:34:50 -08:00
9a728a127a dep: bump golang.org/x/net/context
Move from code.google.com/p/go.net/context to
golang.org/x/net/context before bumping to latest.
2014-11-20 10:19:12 -08:00
f24e214ee5 rafthttp: move server stats in raftHandler to etcdserver 2014-11-17 16:02:20 -08:00
5dc5f8145c *: etcdhttp.raftHandler -> rafthttp.RaftHandler 2014-11-17 15:52:24 -08:00