slachiewicz commented on code in PR #285:
URL: 
https://github.com/apache/flink-connector-kafka/pull/285#discussion_r4040553105


##########
flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/dynamic/source/enumerator/DynamicKafkaSourceEnumeratorTest.java:
##########
@@ -2411,6 +2412,11 @@ private MetadataUpdateEvent getLatestMetadataUpdateEvent(
     @SuppressWarnings("unchecked")
     private MetadataUpdateEvent getLatestMetadataUpdateEventWithoutContextSync(
             MockSplitEnumeratorContext<DynamicKafkaSourceSplit> context, int 
readerId) {
+        // Reflection is required here because 
MockSplitEnumeratorContext#getSentSourceEvent()
+        // dispatches to workerExecutor and blocks on Future#get(). In tests 
that intentionally
+        // block workerExecutor (e.g.
+        // 
testProductionMetadataRefreshBypassesBlockedSourceCoordinatorAsyncCallable),
+        // calling getSentSourceEvent() deadlocks.

Review Comment:
   Partly. FLINK-40543 (still open, Qiu Yanjun asked to take it on 09-13) 
removes the `ConcurrentModificationException`, so the catch in 
`hasLatestMetadataUpdateEvent()` becomes redundant. The reflection here only 
goes away if that fix also stops `getSentSourceEvent()` blocking on 
`workerExecutor`, which the ticket recommends but does not require. Either way 
the connector builds against the lowest supported `flink.version`, so both stay 
until that minimum carries the fix.
   
   *This comment was created with AI assistance.*



-- 
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]

Reply via email to