-
Notifications
You must be signed in to change notification settings - Fork 7
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
Quorum-based Series() query short circuit #137
base: db_main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -655,6 +665,9 @@ func newEagerRespSet( | |||
resp, err := cl.Recv() | |||
if err != nil { | |||
if err == io.EOF { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check if this is response stream is canceled by another stream because the quorum is reached.
if err == context.Canceled {
log something
pkg/store/proxy_merge.go
Outdated
@@ -665,6 +678,8 @@ func newEagerRespSet( | |||
<-t.C // Drain the channel if it was already stopped. | |||
} | |||
rerr = errors.Wrapf(err, "failed to receive any data in %s from %s", l.frameTimeout, storeName) | |||
} else if qg != nil && qg.counter.Load() >= qg.quorum { | |||
rerr = errors.Wrapf(err, "quorum reached and canceled %s", storeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better error message .. cancelled all other pending response streams
.
cancel the last store if all other stores returns no error