-
Notifications
You must be signed in to change notification settings - Fork 362
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
Import: Change merge logic #6251
Conversation
Like I said in #6250, while it's great to reuse the merge logic for the import, I don't think the import is part of the merge. I feel responsible for taking us down this path but I can only suggest two things:
|
…lity to the committed manager
…ge-logic # Conflicts: # pkg/graveler/committed/skip_prefix_iterator.go
pkg/graveler/graveler.go
Outdated
@@ -565,7 +567,7 @@ type VersionController interface { | |||
Merge(ctx context.Context, repository *RepositoryRecord, destination BranchID, source Ref, commitParams CommitParams, strategy string) (CommitID, error) | |||
|
|||
// Import Creates a merge-commit using source MetaRangeID into destination branch with a src-wins merge strategy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc needs to be updated to reflect the prefix logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
done
return false | ||
} | ||
ipi.updateValue() | ||
ipi.currentPrefixIndex++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? What if the next range is also bounded by the prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True
This should be like in Next()
and call updatePrefix
.
Co-authored-by: Yoni <yoni.augarten@treeverse.io>
…eFS into feature/import/merge-logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor code style suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
In order to support some cases of the import behavior, additional checks were needed to be added to the
merger
logic.This PR includes those changes and tests for the import behavior.
It's recommended to review #6250 (the
PrefixIterator
is sufficient)Closes #6162