You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by fa...@apache.org on 2023/05/30 07:54:33 UTC

[seatunnel] branch dev updated: [Hotfix][Zeta] Fix completePendingCheckpoint concurrent action (#4854)

This is an automated email from the ASF dual-hosted git repository.

fanjia pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 6101fcda0 [Hotfix][Zeta] Fix completePendingCheckpoint concurrent action (#4854)
6101fcda0 is described below

commit 6101fcda061a3ed667237caab78a83734be3de97
Author: hailin0 <wa...@apache.org>
AuthorDate: Tue May 30 15:54:27 2023 +0800

    [Hotfix][Zeta] Fix completePendingCheckpoint concurrent action (#4854)
    
    This operation does not allow concurrent execution
---
 config/seatunnel.yaml                                             | 2 +-
 docs/en/seatunnel-engine/checkpoint-storage.md                    | 8 ++++----
 .../src/test/resources/seatunnel.yaml                             | 2 +-
 .../seatunnel-engine-client/src/test/resources/seatunnel.yaml     | 2 +-
 .../seatunnel-engine-common/src/main/resources/seatunnel.yaml     | 2 +-
 .../engine/common/config/YamlSeaTunnelConfigParserTest.java       | 2 +-
 .../seatunnel-engine-common/src/test/resources/seatunnel.yaml     | 2 +-
 .../seatunnel/engine/server/checkpoint/CheckpointCoordinator.java | 2 +-
 .../seatunnel-engine-server/src/test/resources/seatunnel.yaml     | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/config/seatunnel.yaml b/config/seatunnel.yaml
index 86eaee6a0..7e496ca39 100644
--- a/config/seatunnel.yaml
+++ b/config/seatunnel.yaml
@@ -26,7 +26,7 @@ seatunnel:
     checkpoint:
       interval: 10000
       timeout: 60000
-      max-concurrent: 5
+      max-concurrent: 1
       tolerable-failure: 2
       storage:
         type: hdfs
diff --git a/docs/en/seatunnel-engine/checkpoint-storage.md b/docs/en/seatunnel-engine/checkpoint-storage.md
index d1f8d9746..a88f30143 100644
--- a/docs/en/seatunnel-engine/checkpoint-storage.md
+++ b/docs/en/seatunnel-engine/checkpoint-storage.md
@@ -59,7 +59,7 @@ seatunnel:
     checkpoint:
       interval: 6000
       timeout: 7000
-      max-concurrent: 5
+      max-concurrent: 1
       tolerable-failure: 2
       storage:
         type: hdfs
@@ -94,7 +94,7 @@ seatunnel:
         checkpoint:
             interval: 6000
             timeout: 7000
-            max-concurrent: 5
+            max-concurrent: 1
             tolerable-failure: 2
             storage:
                 type: hdfs
@@ -119,7 +119,7 @@ seatunnel:
     checkpoint:
       interval: 6000
       timeout: 7000
-      max-concurrent: 5
+      max-concurrent: 1
       tolerable-failure: 2
       storage:
         type: hdfs
@@ -160,7 +160,7 @@ seatunnel:
     checkpoint:
       interval: 6000
       timeout: 7000
-      max-concurrent: 5
+      max-concurrent: 1
       tolerable-failure: 2
       storage:
         type: hdfs
diff --git a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/seatunnel.yaml b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/seatunnel.yaml
index 164d1285b..16b9f55c3 100644
--- a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/seatunnel.yaml
+++ b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/resources/seatunnel.yaml
@@ -25,7 +25,7 @@ seatunnel:
     checkpoint:
       interval: 300000
       timeout: 10000
-      max-concurrent: 5
+      max-concurrent: 1
       tolerable-failure: 2
       storage:
         type: localfile
diff --git a/seatunnel-engine/seatunnel-engine-client/src/test/resources/seatunnel.yaml b/seatunnel-engine/seatunnel-engine-client/src/test/resources/seatunnel.yaml
index 555d58656..ea5b5ac23 100644
--- a/seatunnel-engine/seatunnel-engine-client/src/test/resources/seatunnel.yaml
+++ b/seatunnel-engine/seatunnel-engine-client/src/test/resources/seatunnel.yaml
@@ -24,7 +24,7 @@ seatunnel:
         checkpoint:
             interval: 6000
             timeout: 7000
-            max-concurrent: 5
+            max-concurrent: 1
             tolerable-failure: 2
             storage:
                 type: hdfs
diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml b/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml
index cab12e5dc..e5d92281d 100644
--- a/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml
+++ b/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml
@@ -25,7 +25,7 @@ seatunnel:
         checkpoint:
             interval: 300000
             timeout: 10000
-            max-concurrent: 5
+            max-concurrent: 1
             tolerable-failure: 2
             storage:
                 type: hdfs
diff --git a/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java b/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
index 1263a5723..4c199b352 100644
--- a/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
+++ b/seatunnel-engine/seatunnel-engine-common/src/test/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelConfigParserTest.java
@@ -54,7 +54,7 @@ public class YamlSeaTunnelConfigParserTest {
                 7000, config.getEngineConfig().getCheckpointConfig().getCheckpointTimeout());
 
         Assertions.assertEquals(
-                5, config.getEngineConfig().getCheckpointConfig().getMaxConcurrentCheckpoints());
+                1, config.getEngineConfig().getCheckpointConfig().getMaxConcurrentCheckpoints());
 
         Assertions.assertEquals(
                 2, config.getEngineConfig().getCheckpointConfig().getTolerableFailureCheckpoints());
diff --git a/seatunnel-engine/seatunnel-engine-common/src/test/resources/seatunnel.yaml b/seatunnel-engine/seatunnel-engine-common/src/test/resources/seatunnel.yaml
index d70dfc5d3..4f6ce5f4e 100644
--- a/seatunnel-engine/seatunnel-engine-common/src/test/resources/seatunnel.yaml
+++ b/seatunnel-engine/seatunnel-engine-common/src/test/resources/seatunnel.yaml
@@ -25,7 +25,7 @@ seatunnel:
         checkpoint:
             interval: 6000
             timeout: 7000
-            max-concurrent: 5
+            max-concurrent: 1
             tolerable-failure: 2
             storage:
                 type: hdfs
diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java
index 1b33c4c64..ee1f7ae5c 100644
--- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java
+++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/checkpoint/CheckpointCoordinator.java
@@ -614,7 +614,7 @@ public class CheckpointCoordinator {
                         : SubtaskStatus.RUNNING);
     }
 
-    public void completePendingCheckpoint(CompletedCheckpoint completedCheckpoint) {
+    public synchronized void completePendingCheckpoint(CompletedCheckpoint completedCheckpoint) {
         LOG.debug(
                 "pending checkpoint({}/{}@{}) completed! cost: {}, trigger: {}, completed: {}",
                 completedCheckpoint.getCheckpointId(),
diff --git a/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml b/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml
index e8303b994..8f22b0613 100644
--- a/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml
+++ b/seatunnel-engine/seatunnel-engine-server/src/test/resources/seatunnel.yaml
@@ -25,7 +25,7 @@ seatunnel:
         checkpoint:
             interval: 6000
             timeout: 7000
-            max-concurrent: 5
+            max-concurrent: 1
             tolerable-failure: 2
             storage:
                 type: hdfs