pvary commented on code in PR #9308:
URL: https://github.com/apache/iceberg/pull/9308#discussion_r1431731166


##########
flink/v1.18/flink/src/main/java/org/apache/iceberg/flink/source/reader/IcebergSourceSplitReader.java:
##########
@@ -80,6 +88,35 @@ public RecordsWithSplitIds<RecordAndPosition<T>> fetch() 
throws IOException {
     }
 
     if (currentReader.hasNext()) {
+      if (pausedSplits.contains(currentSplitId)) {

Review Comment:
   The current code adds logging as well, so we can understand why the thread 
is paused.
   OTOH we do not want to write one log line in every loop (every second). For 
this we need to add a variable (named `first` in the code). This variable 
creation is inside of the `if` codepath to prevent unnecessary variable 
creation in the happy path. That is the only point where the option 1 and 
option 2 is different.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to