You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RowDelta validate data file exist should start from recent rewrite snapshot #2371
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.
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.
Activity
rdblue commentedon Oct 8, 2021
I don't think that this is a problem.
validateDataFilesExistis 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 callingvalidateFromSnapshotwith the snapshot used for all reads.