303 Commits

Author SHA1 Message Date
Gyuho Lee
5bc28488b2 rafthttp: remove unused test Transporter
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-17 14:17:08 -07:00
Gyuho Lee
7a92bbfed2 etcdserver/*: move internal v2 packages
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-14 12:49:49 -07:00
Gyuho Lee
e11f3d852f rafthttp: add more details to structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-04 12:31:35 -07:00
Gyuho Lee
53ade5e872 rafthttp: fix "unconvert" warnings
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-30 15:32:16 -07:00
Gyuho Lee
8296ce0930 rafthttp: add/fix debugging lines
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-19 13:18:57 -07:00
Gyuho Lee
c68f625353 rafthttp: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
6ef2b7bcee rafthttp: add missing "peer_sent_failures_total" metrics call
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-14 12:43:25 -04:00
Gyuho Lee
29d9543850 rafthttp: add "ActivePeers" to "Transport"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-10 18:50:47 -08:00
Gyuho Lee
f802cd9db2
Merge pull request #9366 from gyuho/rafthttp-mu
rafthttp: make "ActiveSince" non-blocking on write lock
2018-02-26 19:19:27 -08:00
Gyuho Lee
9b5d6edc4b *: revert "internal/raftsnap"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
0850ccbf45 *: revert "internal/version" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
fbe6767570 rafthttp: make "ActiveSince" non-blocking on write lock
"ActiveSince" is read-only, and should be able to call
concurrently, as long as there is no routine holding
write lock (send, send snapshot).

e.g. "ActiveSince" is used around etcd server
"processInternalRaftRequestOnce", should be non-blocking

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 16:47:29 -08:00
Gyuho Lee
37546f74ab *: move "version" to "internal/version"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 10:00:20 -08:00
Gyuho Lee
dee39bf786 internal/raftsnap: move "raftsnap" to internal
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:36:04 -08:00
Gyuho Lee
bb2c48b38a rafthttp: rename "snap" to "raftsnap" package
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:26:07 -08:00
Gyuho Lee
bd9bd71a61 rafthttp: add 3.3.0 support
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 13:34:12 -08:00
Anthony Romano
846255b95e Merge pull request #8513 from shenlanse/bug-fix
rafthttp: add remote in pipeline and snapshot handler
2017-09-12 13:48:56 -07:00
blueblue
5f36875272 rafthttp: add remote in pipeline and snapshot handler when corresponding peer or remote do not exist
Fixes: #8506
2017-09-12 18:38:18 +08:00
Gyu-Ho Lee
0b2d8a6c96 *: fix minor typos
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-11 07:33:35 -07:00
Gyu-Ho Lee
f65aee0759 *: replace 'golang.org/x/net/context' with 'context'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
blueblue
2bb893b478 rafthttp: add remote in pipeline and snapshot handler when corresponding peer or remote do not exist
Fixes: #8506
2017-09-07 13:49:39 +08:00
blueblue
a0361ea3f9 rafthttp: add remote in pipeline and snapshot handler when corresponding peer or remote do not exist
Fixes: #8506
2017-09-07 10:14:54 +08:00
Anthony Romano
9543431aeb rafthttp: permit very large v2 snapshots
v2 snapshots were hitting the 512MB message decode limit, causing
sending snapshots to new members to fail for being too big.
2017-06-09 10:41:27 -07:00
Anthony Romano
887db5a3db *: fix go tool vet -all -shadow errors 2017-06-03 21:32:36 -07:00
Vitaly Isaev
4301f49988 rafthttp: configurable stream reader retry timeout
rafthttp.Transport.DialRetryTimeout field alters the frequency of dial attempts
+ minor changes after code review
2017-06-02 08:53:17 -07:00
Anthony Romano
1153e1e7d9 Merge pull request #7687 from heyitsanthony/deny-tls-ipsan
transport: deny incoming peer certs with wrong IP SAN
2017-04-13 15:03:25 -07:00
Gyu-Ho Lee
56b111df0c rafthttp: use 'transport.IsClosedConnError'
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-13 11:55:22 -07:00
Anthony Romano
cad1215b18 *: deny incoming peer certs with wrong IP SAN 2017-04-12 13:41:33 -07:00
Gyu-Ho Lee
8db8d01712 rafthttp: move test-only functions to '_test.go'
Not used in actual code base, only used in tests

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-10 16:07:31 -07:00
Gyu-Ho Lee
3d75395875 *: remove never-unused vars, minor lint fix
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-06 14:59:12 -08:00
sharat
2656b594bb rafthttp: use http.Request.WithContext instead of Cancel 2017-02-02 02:30:36 +05:30
Gyu-Ho Lee
fa9a78450c
rafthttp: add 3.2.0 stream type 2017-01-13 14:23:15 -08:00
Gyu-Ho Lee
d25f9feb19
rafthttp: bump up timeout in pipeline test
Fix https://github.com/coreos/etcd/issues/6283.

The timeout is too short. It could take more than 10ms
to send when the buffer gets full after 'pipelineBufSize' of
requests.
2016-12-30 09:46:16 -08:00
Gyu-Ho Lee
0626ee048e rafthttp: fix gofmt issues with go tip 2016-10-20 16:32:56 -07:00
Gyu-Ho Lee
8827619f5b rafthttp: add v3.x to supported streams 2016-09-16 20:49:00 +09:00
Xiang Li
fb760b4c53 Merge pull request #6403 from vimalk78/rafthttp-mertics-record-rw-failures
rafthttp/metrics.go:fixed TODO: record write/recv failures.
2016-09-15 02:46:20 -05:00
Vimal Kumar
64e1a327ee rafthttp/metrics.go:fixed TODO: record write/recv failures. 2016-09-15 11:32:08 +05:30
Xiang Li
0d35ba9b94 rafthttp: fix TestPipelineExceedMaximumServing
The timeout is too short. It might take more than 10ms to send
request over a blocking chan (buffer is full). Changing the timeout
to 1 second can fix this issue.
2016-09-13 19:06:11 +08:00
Anthony Romano
0250f0c984 rafthttp: log stream stopped message before closing channel
Was causing spurious goroutine leak failures in testing.
2016-09-09 12:47:06 -07:00
Anthony Romano
96ed856bca Merge pull request #6345 from topecongiro/patch-1
rafthttp: remove unnecessary sendc from peer
2016-09-06 11:32:16 -07:00
Nikita Vetoshkin
da26e230a0 rafthttp: fix misprint in readBytesLimit value
and make test path in restricted test environments
2016-09-05 11:06:08 +05:00
Gyu-Ho Lee
5c8ba23767 rafthttp: check decode size before buffer alloc
Fix https://github.com/coreos/etcd/issues/5386.
2016-09-05 14:06:03 +09:00
topecongiro
ec9e77db96 rafthttp: remove unnecessary sendc from peer 2016-09-04 13:07:31 +09:00
Anthony Romano
784c4446d9 rafthttp: fix race in TestStreamWriterAttachOutgoingConn
Fixes #6230
2016-08-19 19:59:16 -07:00
Anthony Romano
da1e022890 rafthttp: remove WaitSchedule() from tests
Fixes #6187
2016-08-18 16:26:35 -07:00
Gyu-Ho Lee
bd450c1ba3 rafthttp: use reportCriticalError, fix typo 2016-08-15 10:40:58 -07:00
Anthony Romano
9eb6ea34bd Merge pull request #6175 from heyitsanthony/fix-conn-race
rafthttp: fix race between streamReader.stop() and connection closer
2016-08-15 09:27:24 -07:00
Anthony Romano
911c8442b7 rafthttp: fix race between streamReader.stop() and connection closer 2016-08-15 01:36:09 -07:00
Gyu-Ho Lee
0503676bde rafthttp: fix httputil.RequestCanceler 2016-08-14 14:36:51 -07:00
Gyu-Ho Lee
937ae658dd rafthttp: add Transport.Cut/MendPeer
From https://github.com/coreos/etcd/pull/6140.
2016-08-10 17:09:35 -07:00