Skip to content

Commit

Permalink
[FLINK-36949] Make getCurrentKey of async state operators return the …
Browse files Browse the repository at this point in the history
…ground truth
  • Loading branch information
Zakelly committed Dec 23, 2024
1 parent 1523f2c commit 15825fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ public void setCurrentContext(RecordContext<K> switchingContext) {
}
}

public RecordContext<K> getCurrentContext() {
return currentContext;
}

/**
* Dispose a context.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public void setKeyContextElement2(StreamRecord record) throws Exception {

@Override
public Object getCurrentKey() {
return currentProcessingContext.getKey();
return asyncExecutionController.getCurrentContext().getKey();
}

// ------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public final <T> void setAsyncKeyedContextElement(

@Override
public Object getCurrentKey() {
return currentProcessingContext.getKey();
return asyncExecutionController.getCurrentContext().getKey();
}

@Override
Expand Down

0 comments on commit 15825fe

Please sign in to comment.