Skip to content

Conversation

@SkyFan2002
Copy link
Member

@SkyFan2002 SkyFan2002 commented Nov 6, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Because the old retry path recomputed SegmentsDiff from the mutable new_table_meta, each failed attempt turned the “transaction snapshot” into the already-merged snapshot; the next retry treated those merged segments as fresh appends, applied them again to the latest snapshot, and duplicated the same segments.

Now we cache the original transaction snapshot and diff up front so every retry uses the immutable state.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix this PR patches a bug in codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant