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

load backup with restricted range #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fridgei
Copy link

@fridgei fridgei commented Jul 13, 2022

Description

This will allow us to load backups with restricted ranges to allow for resharding.

@fridgei fridgei changed the title load backup with restricte range load backup with restricted range Jul 13, 2022
@fridgei fridgei requested a review from avinashparchuri August 1, 2022 17:34
@fridgei fridgei requested a review from sarah-moll August 1, 2022 17:34
@fridgei fridgei requested a review from asimshankar August 1, 2022 17:34
//
// DB.LoadForRange() should be called on a database that is not running any other
// concurrent transactions while it is running.
func (db *DB) LoadForRange(r io.Reader, maxPendingWrites int, minID uint64, maxID uint64) error {

Choose a reason for hiding this comment

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

Can we pass in configDocRanges (docs.RangeSlice) instead of minID and maxID?

for _, kv := range list.Kv {
if id, err := decodeBadgerKeyForDocID(kv.Key); err != nil {
return err
} else if id < minID || id > maxID {

Choose a reason for hiding this comment

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

Similar comment, can we use !configDocRanges.Contains(id) ?

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