Skip to content

Writes to a non-main branch uses main's head as the parent snapshot, corrupting branch lineageΒ #1636

Description

@badalprasadsingh

Apache Iceberg version

main (development)

Please describe the bug 🐞

Any write operation (Append, AppendTable, Overwrite, or Delete) executed through a transaction created with NewTransactionOnBranch(branch) for a branch other than main builds the new snapshot with the wrong parent.

Impact:

  • The new snapshot records the main branch's head as its parent instead of the target branch's head.
  • The branch silently inherits data files from main, leading to incorrect snapshot lineage and data corruption.

Contribution:
I'll submit a PR to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions