-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix issue where chainSampleIterator
can obscure errors
#540
Conversation
…errors Signed-off-by: Charles Korn <[email protected]>
Do you mean "... and therefore not check |
English is ambiguous :) I've tried to make it clearer. |
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
Signed-off-by: Charles Korn <[email protected]>
chainSampleIterator.Seek()
can obscure errorschainSampleIterator
can obscure errors
This brings in the fix from grafana/mimir-prometheus#540.
* Upgrade mimir-prometheus This brings in the fix from grafana/mimir-prometheus#540. * Add changelog entry
👍 |
If any iterator in a
chainSampleIterator
has a sample after the desired timestamp whenSeek()
is called,Seek()
will not returnValNone
.If some iterators have failed (ie. calling
innerIterator.Err()
returns a non-nil
value) and others have not, this behaviour may hide errors from those iterators: callers ofSeek()
will not receiveValNone
and therefore won't know to checkchainSampleIterator.Err()
.Next()
is susceptible to a similar issue ifNext()
is not called until the stream is completely exhausted.I'll submit this fix upstream once we've tested Mimir with it.