liming30 commented on PR #5119: URL: https://github.com/apache/paimon/pull/5119#issuecomment-2673790948
@tsreaper hi, `elementsQueue.notifyAvailable()` should not be removed here. Consider this case: 1. The `reader` consumes data too quickly and has already consumed all the data, but the checkpoint has not been triggered yet. As a result, `shouldTriggerCheckpoint() `returns `Optional.empty()`. 2. The checkpoint starts triggering and `Enumerator` sends a `CheckpointEvent` to the `reader`, but `shouldTriggerCheckpoint() `will not be called again. 3. The `SourceTask` receives the checkpoint RPC message, but since `shouldTriggerCheckpoint()` does not return a valid `CheckpointID`, the process hangs. Therefore, we need to call `elementsQueue.notifyAvailable()` when the `CheckpointEvent` is received to ensure that `shouldTriggerCheckpoint()` returns a valid `CheckpointID`. -- 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]
