davidradl commented on code in PR #25773:
URL: https://github.com/apache/flink/pull/25773#discussion_r1877705441
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/InternalTimerServiceAsyncImpl.java:
##########
@@ -125,13 +137,14 @@ protected void foreachTimer(
"Batch operation is not supported when using async state.");
}
- private void maintainContextAndProcess(
+ private StateFuture<Void> maintainContextAndProcess(
InternalTimer<K, N> timer, ThrowingRunnable<Exception> runnable) {
RecordContext<K> recordCtx =
asyncExecutionController.buildContext(null, timer.getKey());
recordCtx.retain();
asyncExecutionController.setCurrentContext(recordCtx);
keyContext.setCurrentKey(timer.getKey());
- asyncExecutionController.syncPointRequestWithCallback(runnable);
+ StateFuture<Void> future =
asyncExecutionController.syncPointRequestWithCallback(runnable);
recordCtx.release();
+ return future;
Review Comment:
NIT:
I am curious if there a reason to release the context before returning. If
not could we have could we change to `return
asyncExecutionController.syncPointRequestWithCallback(runnable);`
--
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]