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

chore(storage): remove FindKeyRangeWithPrefix and fix DeleteRange #2343

Merged
merged 5 commits into from
May 31, 2024

Conversation

PragmaTwice
Copy link
Member

The method FindKeyRangeWithPrefix seems useless since we can always construct a key range quickly, without knowing the exact first key and last key in the range.

@PragmaTwice PragmaTwice requested a review from git-hulk May 30, 2024 14:42
Comment on lines +381 to +387
for (auto iter = s.rbegin(); iter != s.rend(); ++iter) {
if (*iter != char(0xff)) {
(*iter)++;
break;
}
}
return s;
Copy link
Member

Choose a reason for hiding this comment

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

should we append a '0x00' if s == return s?

Copy link
Member Author

@PragmaTwice PragmaTwice May 31, 2024

Choose a reason for hiding this comment

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

I think the semantics is different between appending 0x00 and increasing last char by 1.

@PragmaTwice PragmaTwice merged commit a498266 into apache:unstable May 31, 2024
32 checks passed
Copy link

sonarcloud bot commented May 31, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

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.

3 participants