Skip to content

Commit

Permalink
[Enhancement] Support RESTORE_CLUSTER_SNAPSHOT env var to enter the r…
Browse files Browse the repository at this point in the history
…estore cluster snapshot procedure

Signed-off-by: xiangguangyxg <[email protected]>
  • Loading branch information
xiangguangyxg committed Feb 7, 2025
1 parent 64d9e17 commit a07e66a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ private RestoreClusterSnapshotMgr(String clusterSnapshotYamlFile) throws StarRoc
public static void init(String clusterSnapshotYamlFile, String[] args) throws StarRocksException {
for (String arg : args) {
if (arg.equalsIgnoreCase("-cluster_snapshot")) {
LOG.info("FE start to restore from a cluster snapshot");
LOG.info("FE start to restore from a cluster snapshot (-cluster_snapshot)");
instance = new RestoreClusterSnapshotMgr(clusterSnapshotYamlFile);
return;
}
}

String restoreClusterSnapshotEnv = System.getenv("RESTORE_CLUSTER_SNAPSHOT");
if (restoreClusterSnapshotEnv != null && restoreClusterSnapshotEnv.equalsIgnoreCase("true")) {
LOG.info("FE start to restore from a cluster snapshot (RESTORE_CLUSTER_SNAPSHOT=true)");
instance = new RestoreClusterSnapshotMgr(clusterSnapshotYamlFile);
}
}

public static boolean isRestoring() {
Expand Down

0 comments on commit a07e66a

Please sign in to comment.