Skip to content

Validate current-snapshot-id and main branch consistency in table metadata #1200

Backlog

Description

@manuzhang

Table metadata records the current snapshot in current-snapshot-id and can also identify it through the main branch in refs. Today, a metadata file can name a current snapshot that is absent from its snapshot list, or it can point current-snapshot-id and refs.main at different snapshots.

Extend TableMetadata::Validate() to check these relationships in full table metadata. Cover a dangling current snapshot ID and a disagreement between two existing snapshots. Preserve support for tables without a current snapshot and for metadata that omits refs, where the reader derives main from the current snapshot ID.

Requested by @xndai in the review of #1169.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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