Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cp-gap
  • Loading branch information
Caideyipi committed Jun 7, 2025
commit 046d00db21dc6d28679dbc425677cafb732bc939
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public class CommonConfig {
private long pipeMetaSyncerSyncIntervalMinutes = 3;
private long pipeMetaSyncerAutoRestartPipeCheckIntervalRound = 1;
private boolean pipeAutoRestartEnabled = true;
private long pipeProgressIndexPersistCheckPoint = 20;
private long pipeProgressIndexPersistCheckPointGap = 20;

private boolean pipeAirGapReceiverEnabled = false;
private int pipeAirGapReceiverPort = 9780;
Expand Down Expand Up @@ -1213,17 +1213,18 @@ public void setPipeAutoRestartEnabled(boolean pipeAutoRestartEnabled) {
logger.info("pipeAutoRestartEnabled is set to {}.", pipeAutoRestartEnabled);
}

public long getPipeProgressIndexPersistCheckPoint() {
return pipeProgressIndexPersistCheckPoint;
public long getPipeProgressIndexPersistCheckPointGap() {
return pipeProgressIndexPersistCheckPointGap;
}

public void setPipeProgressIndexPersistCheckPoint(long pipeProgressIndexPersistCheckPoint) {
if (this.pipeProgressIndexPersistCheckPoint == pipeProgressIndexPersistCheckPoint) {
public void setPipeProgressIndexPersistCheckPointGap(long pipeProgressIndexPersistCheckPointGap) {
if (this.pipeProgressIndexPersistCheckPointGap == pipeProgressIndexPersistCheckPointGap) {
return;
}
this.pipeProgressIndexPersistCheckPoint = pipeProgressIndexPersistCheckPoint;
this.pipeProgressIndexPersistCheckPointGap = pipeProgressIndexPersistCheckPointGap;
logger.info(
"pipeProgressIndexPersistCheckPoint is set to {}.", pipeProgressIndexPersistCheckPoint);
"pipeProgressIndexPersistCheckPointGap is set to {}.",
pipeProgressIndexPersistCheckPointGap);
}

public long getPipeConnectorRetryIntervalMs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public static void shutdownBackgroundService() {
LOGGER.warn("Pipe progressIndex background service did not terminate within {}s", 30);
}
} catch (InterruptedException e) {
LOGGER.warn("Pipe progressIndex background service still doesn't exit after 30s");
LOGGER.warn(
"Pipe progressIndex background service is interrupted while waiting for termination");
Thread.currentThread().interrupt();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class PipeTaskMeta {
private final AtomicLong updateCount = new AtomicLong(0);
private final AtomicLong lastPersistCount = new AtomicLong(0);
private final long checkPointGap =
PipeConfig.getInstance().getPipeProgressIndexPersistCheckPoint();
PipeConfig.getInstance().getPipeProgressIndexPersistCheckPointGap();
private final int taskIndex;
private final File progressIndexPersistFile;
private final AtomicBoolean isRegisterPersistTask = new AtomicBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public String getPipeProgressIndexPersistDirName() {
return COMMON_CONFIG.getPipeProgressIndexPersistDirName();
}

public long getPipeProgressIndexPersistCheckPoint() {
return COMMON_CONFIG.getPipeProgressIndexPersistCheckPoint();
public long getPipeProgressIndexPersistCheckPointGap() {
return COMMON_CONFIG.getPipeProgressIndexPersistCheckPointGap();
}

public String getPipeHardlinkWALDirName() {
Expand Down Expand Up @@ -459,7 +459,8 @@ public void printAllConfigs() {
LOGGER.info("PipeHardlinkBaseDirName: {}", getPipeHardlinkBaseDirName());
LOGGER.info("PipeHardlinkTsFileDirName: {}", getPipeHardlinkTsFileDirName());
LOGGER.info("PipeProgressIndexPersistDirName: {}", getPipeProgressIndexPersistDirName());
LOGGER.info("PipeProgressIndexPersistCheckPoint: {}", getPipeProgressIndexPersistCheckPoint());
LOGGER.info(
"PipeProgressIndexPersistCheckPointGap: {}", getPipeProgressIndexPersistCheckPointGap());
LOGGER.info("PipeHardlinkWALDirName: {}", getPipeHardlinkWALDirName());
LOGGER.info("PipeHardLinkWALEnabled: {}", getPipeHardLinkWALEnabled());
LOGGER.info("PipeFileReceiverFsyncEnabled: {}", getPipeFileReceiverFsyncEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public static void loadPipeStaticConfig(CommonConfig config, TrimProperties prop
Boolean.parseBoolean(
properties.getProperty(
"pipe_auto_restart_enabled", String.valueOf(config.getPipeAutoRestartEnabled()))));
config.setPipeProgressIndexPersistCheckPoint(
config.setPipeProgressIndexPersistCheckPointGap(
Long.parseLong(
properties.getProperty(
"pipe_progress_index_persist_check_point",
String.valueOf(config.getPipeProgressIndexPersistCheckPoint()))));
"pipe_progress_index_persist_check_point_gap",
String.valueOf(config.getPipeProgressIndexPersistCheckPointGap()))));

config.setPipeAirGapReceiverEnabled(
Boolean.parseBoolean(
Expand Down
Loading