This is an automated email from the ASF dual-hosted git repository.
ic4y pushed a commit to branch cdc-multiple-table
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/cdc-multiple-table by this
push:
new 061f9b587 [Hotfix][Zeta] keep deleteCheckpoint method synchronized
(#4209)
061f9b587 is described below
commit 061f9b587212fc5854443eec25113ee8c78c9014
Author: ic4y <[email protected]>
AuthorDate: Fri Feb 24 16:55:46 2023 +0800
[Hotfix][Zeta] keep deleteCheckpoint method synchronized (#4209)
* [Hotfix][Zeta] keep deleteCheckpoint method synchronized
---
.../seatunnel/starrocks/util/CreateTableParser.java | 17 +++++++++++++++++
.../engine/checkpoint/storage/hdfs/HdfsStorage.java | 2 +-
.../checkpoint/storage/localfile/LocalFileStorage.java | 2 +-
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git
a/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/CreateTableParser.java
b/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/CreateTableParser.java
index 4a8e6db40..ab6153b89 100644
---
a/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/CreateTableParser.java
+++
b/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/util/CreateTableParser.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.seatunnel.connectors.seatunnel.starrocks.util;
import lombok.Getter;
diff --git
a/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java
b/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java
index b37614f56..42ad5eaa9 100644
---
a/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java
+++
b/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java
@@ -226,7 +226,7 @@ public class HdfsStorage extends AbstractCheckpointStorage {
}
@Override
- public void deleteCheckpoint(String jobId, String pipelineId, String
checkpointId) throws CheckpointStorageException {
+ public synchronized void deleteCheckpoint(String jobId, String pipelineId,
String checkpointId) throws CheckpointStorageException {
String path = getStorageParentDirectory() + jobId;
List<String> fileNames = getFileNames(path);
if (fileNames.isEmpty()) {
diff --git
a/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java
b/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java
index c00705e7e..02aed7ebd 100644
---
a/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java
+++
b/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-local-file/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/localfile/LocalFileStorage.java
@@ -242,7 +242,7 @@ public class LocalFileStorage extends
AbstractCheckpointStorage {
}
@Override
- public void deleteCheckpoint(String jobId, String pipelineId, String
checkpointId) throws CheckpointStorageException {
+ public synchronized void deleteCheckpoint(String jobId, String pipelineId,
String checkpointId) throws CheckpointStorageException {
Collection<File> fileList = FileUtils.listFiles(new
File(getStorageParentDirectory() + jobId), FILE_EXTENSIONS, false);
if (fileList.isEmpty()) {
throw new CheckpointStorageException("No checkpoint found for job
" + jobId);