Skip to content

Conversation

harishkesavarao
Copy link

@harishkesavarao harishkesavarao commented Oct 12, 2025

…Version

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

Resolves #2283

How was this patch tested?

Unit tests in SnapshotManagerSuite.scala.

[info] Run completed in 1 minute, 46 seconds.
[info] Total number of tests run: 37
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 37, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

Does this PR introduce any user-facing changes?

Yes, the PR provides better error logging for users in the SnapshotManager.getLogSegmentforVersion method.

Error name: Missing Delta File at Checkpoint Version (Line 422):
Before: "Missing delta file for version %s"
After: "Missing delta file for version %d. Every checkpoint must have a corresponding delta file at the same version."

Error name: Missing Delta File Version (Lines 452-456):
Before: "Cannot compute snapshot. Missing delta file version %d."
After: "Cannot compute snapshot. Missing delta file version %d. Expected delta files to start from version %d after checkpoint version %d, but found delta file at version %d."

Corrupted Checkpoint Files (Lines 490-500):
Before: "Seems like the checkpoint is corrupted. Failed in getting the file information for:\n%s\namong\n%s"
After: "Checkpoint at version %d appears to be corrupted. Expected to find %d checkpoint files but only found %d. Missing files:\n%s\nAvailable checkpoint files:\n%s"

Non-Contiguous Delta Versions (Lines 154-155):
Before: "Missing delta files: versions are not contiguous: (%s)"
After: "Missing delta files: versions are not contiguous. Expected version %d after version %d, but found version %d. All versions: %s"

No Complete Checkpoint and No Delta Files (Line 410):
Before: "No complete checkpoint found and no delta files found"
After: "No complete checkpoint found and no delta files found. This may indicate a corrupted or incomplete Delta table."

@harishkesavarao harishkesavarao marked this pull request as ready for review October 12, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Kernel] Improve log segment code and error messages

1 participant