Zakelly commented on code in PR #25367:
URL: https://github.com/apache/flink/pull/25367#discussion_r1770746753
##########
flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/AsyncExecutionController.java:
##########
@@ -189,6 +194,9 @@ public RecordContext<K> buildContext(Object record, K key) {
*/
public void setCurrentContext(RecordContext<K> switchingContext) {
currentContext = switchingContext;
+ if (switchContextListener != null) {
Review Comment:
If we keep a empty listener here instead of a `null`, the influence on the
hot path for `async` is similar (`if` vs. a method call). For sync path (a
rocksdb wrapped with adaptor), the `setCurrentContext` will be only invoked
once, since the context switch is skipped for any callbacks of
`CompletedStateFuture`. Thus the influence is minor, I'd prefer keeping it.
--
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]