Skip to content

Commit

Permalink
[enhancement](meta) make checkpoint_interval_seconds configable for test
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Aug 13, 2024
1 parent 8cded12 commit 561121c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,13 @@ public class Config extends ConfigBase {
@ConfField
public static boolean checkpoint_after_check_compatibility = false;

// Advance the next id before transferring to the master.
@ConfField(description = {
"对 meta 做 checkpoint 时的时间间隔,单位为秒",
"The interval of checkpointing meta, in seconds"
})
public static int checkpoint_interval_seconds = 60;

// Advance the next id before transferring to the master.
@ConfField(description = {
"是否在成为 Master 后推进 ID 分配器,保证即使回滚元数据时,它也不会回滚",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public class FeConstants {
public static int shortkey_max_column_count = 3;
public static int shortkey_maxsize_bytes = 36;

public static int checkpoint_interval_second = 60; // 1 minutes

// dpp version
public static String dpp_version = "3_2_0";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.apache.doris.catalog.Env;
import org.apache.doris.common.CheckpointException;
import org.apache.doris.common.Config;
import org.apache.doris.common.FeConstants;
import org.apache.doris.common.util.HttpURLUtil;
import org.apache.doris.common.util.MasterDaemon;
import org.apache.doris.common.util.NetUtils;
Expand Down Expand Up @@ -61,7 +60,7 @@ public class Checkpoint extends MasterDaemon {
private int memoryNotEnoughCount = 0;

public Checkpoint(EditLog editLog) {
super("leaderCheckpointer", FeConstants.checkpoint_interval_second * 1000L);
super("leaderCheckpointer", Config.checkpoint_interval_seconds * 1000L);
this.imageDir = Env.getServingEnv().getImageDir();
this.editLog = editLog;
}
Expand Down

0 comments on commit 561121c

Please sign in to comment.