Commit Graph

34 Commits (01996012bb52c71816a7ea2c3628287abdc4581a)

Author SHA1 Message Date
Gyuho Lee c68f625353 rafthttp: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
sharat 2656b594bb rafthttp: use http.Request.WithContext instead of Cancel 2017-02-02 02:30:36 +05:30
Vimal Kumar 64e1a327ee rafthttp/metrics.go:fixed TODO: record write/recv failures. 2016-09-15 11:32:08 +05:30
Gyu-Ho Lee 0503676bde rafthttp: fix httputil.RequestCanceler 2016-08-14 14:36:51 -07:00
Xiang Li a047aa4a81 rafthttp: rename to to peerID 2016-06-01 22:12:47 -07:00
Xiang Li 8528c8c599 *: more logging on critical state change
Add more logging for better debugging purpose.
2016-05-31 23:31:03 -07:00
Xiang Li efe0ee7e59 rafthttp: remove the newPipeline func
Using struct to initialize pipeline is better when we have many
fields to file in.
2016-05-30 16:19:50 -07:00
Gyu-Ho Lee bd71a60875 rafthttp: update LICENSE header 2016-05-12 20:49:28 -07:00
Xiang Li 98dbdd5fbb *: simplify network metrics 2016-05-09 22:37:12 -07:00
Anthony Romano fe7cfe4d3d rafthttp: plumb local peer URLs through transport 2016-02-05 16:44:41 -08:00
Yicheng Qin 84d7825a77 rafthttp: stop masking errMemberRemoved in pipeline
It makes logic more straightforward and readable. Also, it makes the
handle method consistent with stream and snapshot sender.
2015-10-28 21:40:48 -07:00
Yicheng Qin 908a011604 rafthttp: mark unreachable on unexpected response
In rafthttp, when making request to some endpoint, it may receive
response with unexpected status code and header. This indicates the endpoint
doesn't function correctly. It should mark the endpoint unreachable.
2015-10-28 21:40:11 -07:00
Xiang Li 336d177c82 rafthttp: fix data races detected by go race detector 2015-10-26 15:29:08 -07:00
Yicheng Qin 4076dda101 rafthttp: fix wrong return in pipeline.handle
pipeline.handle is a long-living one, and should continue to receive
next message to send out when current message fails to send. So it
should `continue` instead of `return` here.
2015-10-26 14:05:19 -07:00
Xiang Li 427a154aae rafthttp: various clean up 2015-10-18 09:49:18 -07:00
Yicheng Qin 1f21ccf166 rafthttp: support sending v3 snapshot message
Use snapshotSender to send v3 snapshot message. It puts raft snapshot
message and v3 snapshot into request body, then sends it to the target peer.
When it receives http.StatusNoContent, it knows the message has been
received and processed successfully.

As receiver, snapHandler saves v3 snapshot and then processes the raft snapshot
message, then respond with http.StatusNoContent.
2015-10-13 23:11:28 -07:00
Yicheng Qin 61a75b3d48 rafthttp: always cancel in-flight request when pipeline.send
This fits the way for go1.5 to cancel request.
2015-08-25 09:07:49 -07:00
Yicheng Qin 29dca49cb5 rafthttp: wait 1ms before enabling cancel
CancelRequest only effects on in-flight request, so we need to wait
for Do(request) called before enabling cancel.
2015-06-12 07:55:06 -07:00
Yicheng Qin 1dbe72bb74 rafthttp: pretty print connection error
1. print out the status change of connection with peer
2. only print the first error for repeated ones
2015-06-10 15:43:49 -07:00
Yicheng Qin 1403783326 Merge pull request #2911 from yichengq/rafthttp-plog
rafthttp: use leveled logger
2015-06-09 16:16:33 -07:00
Yicheng Qin f1e995b070 rafthttp: use leveled logger 2015-06-09 16:15:02 -07:00
Yicheng Qin 7f8925e172 rafthttp: fix pipeline.stop may block
This PR makes pipeline.stop stop quickly. It cancels inflight requests,
and stops sending messages in the buffer.
2015-06-02 17:15:44 -07:00
Yicheng Qin 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
Xiang Li 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
Yicheng Qin 9f19b5660f rafthttp: add AddRemote
Add remotes to rafthttp, who help newly joined members catch up the
progress of the cluster. It supports basic message sending to remote, and
has no stream connection for simplicity. remotes will not be used
after the latest peers have been added into rafthttp.
2015-04-24 11:49:23 -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 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
Yicheng Qin b4b9b9118a rafthttp: report MsgSnap status 2015-03-02 09:38:11 -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 1c5a507761 rafthttp: refactor peer and add general stream 2015-02-28 11:35:16 -08:00
Yicheng Qin d8a9e11e22 rafthttp: extract pipeline from peer 2015-02-28 11:06:11 -08:00