Copilot commented on code in PR #9619:
URL: https://github.com/apache/seatunnel/pull/9619#discussion_r2229964466


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/SubPlan.java:
##########
@@ -462,7 +462,7 @@ private void resetPipelineState() throws Exception {
     private boolean prepareRestorePipeline() {
         synchronized (restoreLock) {
             try {
-                pipelineRestoreNum++;
+                pipelineRestoreNum.getAndIncrement();

Review Comment:
   The increment operation is already synchronized by the `restoreLock`, making 
the atomic operation redundant. Consider using 
`pipelineRestoreNum.incrementAndGet()` or just `pipelineRestoreNum++` since the 
synchronization block already provides thread safety.
   ```suggestion
                   pipelineRestoreNum++;
   ```



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

Reply via email to