Skip to content

RowDelta validate data file exist should start from recent rewrite snapshot #2371

Closed

Description

@yuzhaojing

Currently, MergingSnapshotProducer#validateDataFilesExist will validate all snapshots, but it doesn't consider rewrite and expire action. If we rewrite a snapshot, and then expire any snapshot with cleanExpiredFiles(true) before rewrite, this check will throw Execption.
ValidationException.check(currentSnapshot != null, "Cannot determine history between starting snapshot %s and current %s", startingSnapshotId, currentSnapshotId);
Because cleanExpiredFiles will delete snapshot in metadata, and MergingSnapshotProducer#validateDataFilesExist will check all snapshot in metadata from current to first. There must be a parent-snapshot-id doesn't have corresponding snapshot.

Activity

  1. added this to the Row-level Delete milestone on Mar 24, 2021
  2. removed this from the Row-level Delete milestone on Aug 25, 2021
  3. rdblue commented on Oct 8, 2021

    @rdblue
    Contributor

    I don't think that this is a problem. validateDataFilesExist is written correctly, I think it is just used incorrectly in the CDC use case (see #2482 (comment)). In that case, you don't even need to run the validation. And when a validation is used, it needs to be configured by calling validateFromSnapshot with the snapshot used for all reads.

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