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

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found no similar issues.
   
   ### Paimon version
   
   master (1.5-SNAPSHOT)
   
   ### Compute Engine
   
   Flink (cross-partition upsert / global dynamic-bucket sink) with unaligned 
checkpoints.
   
   ### Minimal reproduce step
   
   1. Run a cross-partition upsert sink (global index assigner) with 
`execution.checkpointing.unaligned.enabled = true`.
   2. Have a checkpoint land during the bootstrap-drain window, so a `KEY_PART` 
record is still queued when the barrier triggers.
   
   ### What doesn't meet your expectations?
   
   The assigner crashes. `GlobalIndexAssigner.bootstrapKey` has 
`checkArgument(inBoostrap())`, which throws (and `bootstrapKeys` is already 
null, so it would NPE) when a `KEY_PART` record arrives after the bootstrap 
phase has ended. Under unaligned checkpoints the barrier overtakes buffered 
records, so `prepareSnapshotPreBarrier` runs `endBoostrap` (setting 
`bootstrap=false`, nulling `bootstrapKeys`) while `KEY_PART` records are still 
queued; those late records then hit `bootstrapKey` with `bootstrap == false` 
and fail the job, which can re-fail on restart in the same window. Aligned 
checkpoints never hit this, because barrier alignment processes every 
pre-barrier `KEY_PART` before `endBoostrap`.
   
   ### Anything else?
   
   _No response_
   
   ### 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