corgy-w commented on code in PR #10139:
URL: https://github.com/apache/seatunnel/pull/10139#discussion_r2623956836
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/source/JdbcSourceSplitEnumerator.java:
##########
@@ -48,6 +48,14 @@ public class JdbcSourceSplitEnumerator
private final Context<JdbcSourceSplit> context;
private final Object stateLock = new Object();
+ /**
+ * Indicates whether the enumerator has already notified all registered
readers that there will
+ * be no more splits. This is used to avoid missing {@code
NoMoreSplitsEvent} in failover
+ * scenarios where splits are added back via {@link #addSplitsBack(List,
int)} instead of being
+ * produced via {@link #run()} again.
+ */
+ private boolean noMoreSplitsSignalSent;
Review Comment:
Overall, the direction looks correct and the added tests are helpful.
One concern: noMoreSplitsSignalSent is a global boolean. If a reader
registers after the first successful maybeSignalNoMoreSplits() call, it may
never receive NoMoreSplitsEvent because the flag prevents re-signaling.
--
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]