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

statedb: Fix revision indexing #29840

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

joamaki
Copy link
Contributor

@joamaki joamaki commented Dec 13, 2023

Revision index was marked unique, but encoded the key as <revision> <primary key>. This was an accidental leftover from when revision was per-transaction rather than per insert/delete. The key can now be simplified to just <revision>.

This issue combined with "statedb: Allow non-terminated keys" broke revision queries via the statedb REST API handler as the lowerbound iteration terminated when the key length did not match. Fix the REST API handler as well to not check result keys when doing lowerbound search.

Fixes: aa15ba7 ("statedb: Allow non-terminated keys")

@joamaki joamaki added the release-note/misc This PR makes changes that have no direct user impact. label Dec 13, 2023
@joamaki joamaki requested a review from a team as a code owner December 13, 2023 09:18
Revision index was marked unique, but encoded the key as "<revision> <primary key>".
This was an accidental leftover from when revision was per-transaction rather than
per insert/delete. The key can now be simplified to just "<revision>".

This issue combined with "statedb: Allow non-terminated keys" broke revision
queries via the statedb REST API handler as the lowerbound iteration terminated
when the key length did not match. Fix the REST API handler as well to not
check result keys when doing lowerbound search.

Fixes: aa15ba7 ("statedb: Allow non-terminated keys")
Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/joamaki/fix-revision-indexing branch from 57f44b7 to 73de5e7 Compare December 13, 2023 09:23
@joamaki
Copy link
Contributor Author

joamaki commented Dec 13, 2023

/test

@joamaki joamaki added the release-blocker/1.15 This issue will prevent the release of the next version of Cilium. label Dec 13, 2023
Copy link
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

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

nice catch

@joamaki joamaki added this pull request to the merge queue Dec 13, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Dec 13, 2023
Merged via the queue into cilium:main with commit 3158f74 Dec 13, 2023
62 checks passed
@joamaki joamaki deleted the pr/joamaki/fix-revision-indexing branch December 13, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-blocker/1.15 This issue will prevent the release of the next version of Cilium. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants