Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

refactor: use scanner to refactor range operation(get&delete) #151

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

foreverneverer
Copy link
Contributor

@foreverneverer foreverneverer commented Mar 16, 2021

MultiGet range version api may can't get all records, this pr fix it using scanner, and refactor delRange.

Note

The old api only mark deprecatedfor compatibility

@foreverneverer foreverneverer marked this pull request as ready for review March 18, 2021 04:30
while ((pairs = scanner.next()) != null) {
sortKeys.add(pairs.getKey().getValue());
if (sortKeys.size() == scanOptions.batchSize) {
table.multiDel(hashKey, sortKeys, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

table.multiDel(hashKey, sortKeys, 0);
sortKeys.clear();

=====>

break;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only next=null allow break

@foreverneverer foreverneverer marked this pull request as draft April 6, 2021 02:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants