TyrantLucifer commented on code in PR #5100:
URL: https://github.com/apache/seatunnel/pull/5100#discussion_r1413566331
##########
seatunnel-connectors-v2/connector-common/src/main/java/org/apache/seatunnel/connectors/seatunnel/common/source/AbstractSingleSplitReader.java:
##########
@@ -25,6 +26,23 @@
public abstract class AbstractSingleSplitReader<T> implements SourceReader<T,
SingleSplit> {
+ protected final Object lock = new Object();
+
+ protected volatile boolean noMoreSplits = false;
+
+ @Override
+ public void pollNext(Collector<T> output) throws Exception {
+ synchronized (lock) {
Review Comment:
Considering the possibility of concurrent calls, locking would be safer.
--
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]