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

Prepare for content-aware merges #6592

Closed
snazy opened this issue Apr 14, 2023 · 0 comments · Fixed by #6619
Closed

Prepare for content-aware merges #6592

snazy opened this issue Apr 14, 2023 · 0 comments · Fixed by #6619
Labels
Milestone

Comments

@snazy
Copy link
Member

snazy commented Apr 14, 2023

Merging in Nessie is currently constrained by the fact that changes to the same content object on the references to be merged fail. There are options to mitigate the issue a little bit, by forcing the merge to let one of the changes survive, but this is not the ultimately satisfying solution.

Nessie needs a "more interactive" merge API that responds with the conflicting contents and lets callers chose a new conflict resolution type, namely to use a new content object supplied by the caller.

So the changes could:

  • Add a new enum value APPLY to org.projectnessie.model.MergeBehavior
  • Add three new fields of type Content to MergeKeyBehavior:
    • expectedSourceContent (expected content on the "merge from" reference)
    • expectedTargetContent (expected content on the "merge into" branch
    • resolvedContent (content to be eventually merged)
  • Add two new fields to MergeResponse.ContentKeyDetails:
    • sourceContent (current content on the "merge from" reference)
    • targetContent (current content on the "merge into" branch

This gives callers, for example Iceberg, the ability to create a new table-metadata that is the result of the merge of both the source and target table-metadata.

Since this is a REST API change, at least the API change must be merged before calling REST API v2 "GA".

@snazy snazy added the REST api label Apr 14, 2023
@snazy snazy added this to the 1.0.0 milestone Apr 14, 2023
snazy added a commit to snazy/nessie that referenced this issue Apr 17, 2023
* Adds the necessary bits to allow content-aware merge & transplant operations.
* Also update the version-store SPIs to.
* Does not add the functionality to the (new) storage model.

Fixes projectnessie#6592
snazy added a commit to snazy/nessie that referenced this issue Apr 19, 2023
* Adds the necessary bits to allow content-aware merge & transplant operations.
* Also update the version-store SPIs to.
* Does not add the functionality to the (new) storage model.

Fixes projectnessie#6592
snazy added a commit that referenced this issue Apr 19, 2023
* Adds the necessary bits to allow content-aware merge & transplant operations.
* Also update the version-store SPIs to.
* Does not add the functionality to the (new) storage model.

Fixes #6592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant