Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clientv3: fix retry/streamer error message #11313

Merged
merged 1 commit into from
Oct 31, 2019
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Oct 30, 2019

Fix #11310.

serverStreamingRetryingStream is doing all retries.

Logging should be moved there.

/cc @jpbetz @jingyih

@codecov-io
Copy link

Codecov Report

Merging #11313 into master will increase coverage by 0.13%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11313      +/-   ##
==========================================
+ Coverage   64.18%   64.31%   +0.13%     
==========================================
  Files         403      403              
  Lines       37966    37968       +2     
==========================================
+ Hits        24369    24421      +52     
+ Misses      11954    11905      -49     
+ Partials     1643     1642       -1
Impacted Files Coverage Δ
clientv3/retry_interceptor.go 68.31% <0%> (-1.19%) ⬇️
client/members.go 65.32% <0%> (-20.17%) ⬇️
proxy/grpcproxy/register.go 69.44% <0%> (-11.12%) ⬇️
auth/store.go 65.9% <0%> (-2.43%) ⬇️
clientv3/maintenance.go 40.81% <0%> (-2.05%) ⬇️
proxy/grpcproxy/watch.go 89.94% <0%> (-1.78%) ⬇️
clientv3/client.go 73.56% <0%> (-1.44%) ⬇️
pkg/adt/interval_tree.go 85.96% <0%> (-1.26%) ⬇️
clientv3/op.go 72.08% <0%> (-1.25%) ⬇️
clientv3/watch.go 90.94% <0%> (-1.06%) ⬇️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbe1e78...ea1dfd3. Read the comment docs.

Copy link
Contributor

@jingyih jingyih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, the error on line 117 corresponds to the first attempt of calling streamer(), the error on line 195 corresponds to the retries of the same function call. If this is the case, maybe it make sense to use the same / similar format for these two messages?

// We start off from attempt 1, because zeroth was already made on normal SendMsg().
for attempt := uint(1); attempt < s.callOpts.max; attempt++ {
if err := waitRetryBackoff(s.ctx, attempt, s.callOpts); err != nil {
return err
}
newStream, err := s.reestablishStreamAndResendBuffer(s.ctx)
if err != nil {
// TODO(mwitkow): Maybe dial and transport errors should be retriable?
return err
s.client.lg.Error("failed reestablishStreamAndResendBuffer", zap.Error(err))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jingyih It's a different call.

streamer above is only for creating a stream.

Here, it's handling the error for streamer and resending the buffers.

@jingyih
Copy link
Contributor

jingyih commented Oct 31, 2019

LGTM

@gyuho gyuho merged commit 9177098 into etcd-io:master Oct 31, 2019
@gyuho gyuho deleted the retry-log branch October 31, 2019 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Warning "retry stream intercept" on etcd snapshot
3 participants