-
Notifications
You must be signed in to change notification settings - Fork 454
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
Optimize fetch pathway to avoid decoding more data than required to satisfy consistency #1966
Conversation
6b9b03a
to
ff3aed3
Compare
Codecov Report
@@ Coverage Diff @@
## master #1966 +/- ##
=========================================
Coverage ? 63.5%
=========================================
Files ? 1121
Lines ? 106180
Branches ? 0
=========================================
Hits ? 67466
Misses ? 34403
Partials ? 4311
Continue to review full report at Codecov.
|
case ReadConsistencyLevelNone: | ||
return 0 | ||
} | ||
panic(fmt.Errorf("unrecognized consistency level: %s", level.String())) |
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.
Why panic instead of returning an error here? Seems unidiomatic especially for just a simple helper function. If you really want to panic in the client session, it should catch the error thrown here and panic at the client session code.
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.
Alllright, seems like all other functions here panic instead of returning an error...
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.
LGTM
No description provided.