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 (backport #55664) (#55671)

Co-authored-by: xiangguangyxg <[email protected]>
  • Loading branch information
mergify[bot] and xiangguangyxg authored Feb 7, 2025
1 parent 75d9d33 commit de01d99
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 UserExc
public static void init(String clusterSnapshotYamlFile, String[] args) throws UserException {
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 de01d99

Please sign in to comment.