-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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(storage): cursor requests are [start, stop] instead of [start, stop) #21318
Conversation
Is it possible to show this bug in a new flux end-to-end test? I see a lot of stuff testing mocks and lower level things, but for this sort of off by one error it would be nice to verify everything is really working end-to-end |
I've tried a couple end-to-end tests and I can't make anything fail on Reading the PR again, maybe this is expected? We seem to be changing both ends of the API simultaneously. Is this PR just to make the storage API agree with the docs, without user-facing change? |
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.
See comments - I'd like to see either an end-to-end test showing the broken case (so we can make sure it doesn't regress in the future, and confirm it is really fixed end-to-end), or get confirmation that this is a pure refactor without user-visible changes.
I'm not sure what effects which storage engine so some of this may just be cleanup. I expect most queries are unaffected, but we did find one specific scenario. When In order to fix this, we had to make all of the APIs choose a consistent method of accessing the file store. Because of influxql setting a precedent, we decided storage APIs have to be The unit tests specifically test the underlying behavior for how files can get into bad situations. Generally, the current code works fine after a full compaction happens because the errors pop up when the files are more scattered. Also, these off-by-one errors don't appear to affect the cache. |
35cf560
to
72561bc
Compare
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
02857a2
to
e2ac67d
Compare
The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor.
e2ac67d
to
51b95cc
Compare
The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from influxdata#21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672)
The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from influxdata#21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672)
…op) (#21347) * fix: backport tsdb fix for window pushdowns From #19855 * fix(storage): cursor requests are [start, stop] instead of [start, stop) The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from #21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672) * chore: fix formatting Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
…op) (influxdata#21347) * fix: backport tsdb fix for window pushdowns From influxdata#19855 * fix(storage): cursor requests are [start, stop] instead of [start, stop) The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from influxdata#21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672) * chore: fix formatting Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com> (cherry picked from commit 8edf7a4)
…op) (influxdata#21347) * fix: backport tsdb fix for window pushdowns From influxdata#19855 * fix(storage): cursor requests are [start, stop] instead of [start, stop) The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from influxdata#21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672) * chore: fix formatting Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com> (cherry picked from commit 8edf7a4)
…op) (#21347) (#21348) * fix: backport tsdb fix for window pushdowns From #19855 * fix(storage): cursor requests are [start, stop] instead of [start, stop) The cursors were previously [start, stop) to be consistent with how flux requests data, but the underlying storage file store was [start, stop] because that's how influxql read data. This reverts back the cursor behavior so that it is now [start, stop] everywhere and the conversion from [start, stop) to [start, stop] is performed when doing the cursor request to get the next cursor. cherry-pick from #21318 Co-authored-by: Sam Arnold <sarnold@influxdata.com> (cherry picked from commit 7766672) * chore: fix formatting Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com> (cherry picked from commit 8edf7a4)
The cursors were previously [start, stop) to be consistent with how flux
requests data, but the underlying storage file store was [start, stop]
because that's how influxql read data. This reverts back the cursor
behavior so that it is now [start, stop] everywhere and the conversion
from [start, stop) to [start, stop] is performed when doing the cursor
request to get the next cursor.