mas-chen commented on code in PR #9308:
URL: https://github.com/apache/iceberg/pull/9308#discussion_r1431884906
##########
flink/v1.18/flink/src/main/java/org/apache/iceberg/flink/source/reader/IcebergSourceSplitReader.java:
##########
@@ -112,8 +149,20 @@ public void
handleSplitsChanges(SplitsChange<IcebergSourceSplit> splitsChange) {
metrics.incrementAssignedBytes(calculateBytes(splitsChange));
}
+ /**
+ * WakeUp is called by Flink to unblock a reader blocked in {@link #fetch()}
before calling {@link
+ * #handleSplitsChanges(SplitsChange)} or {@link
#pauseOrResumeSplits(Collection, Collection)} to
+ * update the splits or splits state. After {@link #wakeUp()} the specific
method will be called
+ * before calling the {@link #fetch()} again.
+ */
@Override
- public void wakeUp() {}
+ public void wakeUp() {
Review Comment:
I guess it is okay, since the spurious wakeup condition is caught in the
fetch loop. And this way you can avoid synchronization on pausedSplits
--
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]