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

fix optional prefix iter #1615

Merged
merged 4 commits into from
Jul 3, 2023
Merged

fix optional prefix iter #1615

merged 4 commits into from
Jul 3, 2023

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Jun 23, 2023

Based on v0.17.4

The optional prefix iter did nothing when given None for prefix as shown by the test added in 3bf41d5. The problem was with the upper bound set on the iterator that should only be set when there is a non empty prefix - fixed in 82a07d8. The same issue was already present before changes from #1478 on prefix iter with an empty key (i.e. Key::default()).

This affects the rollback command that relies on the iterator with no prefix.

@tzemanovic tzemanovic force-pushed the tomas/fix-optional-prefix-iter branch from 9344eb8 to d03071c Compare June 23, 2023 11:33
@tzemanovic tzemanovic requested a review from yito88 June 23, 2023 11:36
@tzemanovic tzemanovic mentioned this pull request Jun 23, 2023
Fraccaman added a commit that referenced this pull request Jun 27, 2023
* origin/tomas/fix-optional-prefix-iter:
  changelog: add #1615
  ledger/storage/rocksdb: refactor prefix iter code
  ledger/storage/rocksdb: fix iterator without prefix
  test/ledger/storage/rocksdb: add a test for prefix iter
@Fraccaman Fraccaman mentioned this pull request Jun 27, 2023
@brentstone brentstone merged commit d1c4533 into main Jul 3, 2023
@brentstone brentstone deleted the tomas/fix-optional-prefix-iter branch July 3, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants