AHeise commented on a change in pull request #9564:
[FLINK-12481][FLINK-12482][FLINK-12958] Streaming runtime: integrate mailbox
for timer triggers, checkpoints and AsyncWaitOperator
URL: https://github.com/apache/flink/pull/9564#discussion_r319848458
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/SynchronousCheckpointITCase.java
##########
@@ -151,11 +152,15 @@ protected void performDefaultAction(DefaultActionContext
context) throws Excepti
}
@Override
- public boolean triggerCheckpoint(CheckpointMetaData
checkpointMetaData, CheckpointOptions checkpointOptions, boolean
advanceToEndOfEventTime) throws Exception {
- eventQueue.put(Event.PRE_TRIGGER_CHECKPOINT);
- boolean result =
super.triggerCheckpoint(checkpointMetaData, checkpointOptions,
advanceToEndOfEventTime);
- eventQueue.put(Event.POST_TRIGGER_CHECKPOINT);
- return result;
+ public Future<Boolean>
triggerCheckpointAsync(CheckpointMetaData checkpointMetaData, CheckpointOptions
checkpointOptions, boolean advanceToEndOfEventTime) {
+ try {
+ eventQueue.put(Event.PRE_TRIGGER_CHECKPOINT);
+ Future<Boolean> result =
super.triggerCheckpointAsync(checkpointMetaData, checkpointOptions,
advanceToEndOfEventTime);
+ eventQueue.put(Event.POST_TRIGGER_CHECKPOINT);
+ return result;
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
Review comment:
Yes, do both, interrupt() and throw the exception.
Didn't find the article that I was looking for, but I think this
[one](https://www.yegor256.com/2015/10/20/interrupted-exception.html) is good
enough.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services