zhangshenghang commented on code in PR #10131:
URL: https://github.com/apache/seatunnel/pull/10131#discussion_r2592272620
##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/IcebergStreamSplitEnumerator.java:
##########
@@ -111,8 +113,10 @@ public IcebergSplitEnumeratorState snapshotState(long
checkpointId) throws Excep
@Override
public void handleSplitRequest(int subtaskId) {
- if (initialized) {
- stateLock.notifyAll();
+ synchronized (stateLock) {
+ if (initialized) {
Review Comment:
> The condition check and notifyAll() are performed under the same lock
(stateLock), ensuring semantic consistency. This also prevents potential issues
where someone might insert code between them in the future, leading to
unguarded calls to wait() or notify().
I don't understand your setup like this. `if (initialized)` inside seems to
have no effect
--
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]