LuciferYang opened a new issue, #10126:
URL: https://github.com/apache/paimon/issues/10126

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master
   
   ### Compute Engine
   
   Flink / Spark (chain table, batch INSERT OVERWRITE or rollback)
   
   ### Minimal reproduce step
   
   On a chain table (snapshot branch plus a scan-fallback delta branch), have a 
chain group with two snapshot partitions, for example `CN/20250201` and 
`CN/20250301`, and a delta partition `CN/20250315` anchored after 
`CN/20250301`. Then drop both `CN/20250201` and `CN/20250301` in a single 
commit (a batch INSERT OVERWRITE, or a rollback to before both were written). 
The commit is accepted, and `CN/20250315` is left with no baseline.
   
   ### What doesn't meet your expectations?
   
   `ChainTableCommitPreCallback` is supposed to reject dropping a snapshot 
partition whose delta followers would lose their baseline. Its predecessor and 
successor candidates came from the pre-commit partition list, so a partition 
dropped by the same commit still counted as a valid predecessor of another 
partition dropped by that commit. The check for `CN/20250301` found 
`CN/20250201` as its predecessor and passed, even though `CN/20250201` is being 
dropped in the same commit. The commit lands and `CN/20250315` silently falls 
back to delta-only reads, missing its baseline rows.
   
   Expected: a commit that drops every snapshot partition anchoring a delta 
partition is rejected, the same as dropping that anchor in a standalone commit.
   
   ### Anything else?
   
   Fix direction: validate against the post-commit state. A partition counts as 
dropped only when the commit deletes all of its base files (a rollback that 
deletes some files of a partition leaves it partially alive, and it still 
anchors its delta followers), and only fully dropped partitions are excluded 
from the candidate list and validated.
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to