diff --git a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/MigrationRecoveryHandler.java b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/MigrationRecoveryHandler.java index 13c870ead4f94602e53cda976a648150d81f0d7a..9f49684b01bf27ecec9925359b0ba8cb47ce1515 100644 --- a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/MigrationRecoveryHandler.java +++ b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/MigrationRecoveryHandler.java @@ -387,7 +387,8 @@ class MigrationCommand { private static final String REVERSE_MIGRATION_RUN = "run_reverse_migration"; private static final String REVERSE_MIGRATION_SOURCE = "run_reverse_migration_source"; private static final String REVERSE_MIGRATION_SINK = "run_reverse_migration_sink"; - private static final String CMD_PORTAL_TEMP = "java -Dpath=%s -Dorder=%s -Dskip=true -Dworkspace.id=%s -jar %s"; + private static final String CMD_PORTAL_TEMP = "java -Dpath=%s -Dorder=%s -Dorder.invoked.timestamp=%s" + + " -Dskip=true -Dworkspace.id=%s -jar %s"; private static final Map MIGRATION_PROPERTIES = new HashMap<>(); static { @@ -447,6 +448,8 @@ class MigrationCommand { public String builder(String name) { OpsAssert.isTrue(MIGRATION_PROPERTIES.containsKey(name), "unknown migration command"); String order = MIGRATION_PROPERTIES.get(name); - return String.format(CMD_PORTAL_TEMP, installPath, order, workspaceId, installPath + jarName); + long orderInvokedTimestamp = System.currentTimeMillis(); + return String.format(CMD_PORTAL_TEMP, installPath, order, orderInvokedTimestamp, + workspaceId, installPath + jarName); } } diff --git a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/PortalHandle.java b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/PortalHandle.java index 348dd78163569b5a798a13fded22d65b04254e6b..f40bb768031a01f82db3ee04de390b35caa3f809 100644 --- a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/PortalHandle.java +++ b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/handler/PortalHandle.java @@ -318,12 +318,16 @@ public class PortalHandle { public static void stopIncrementalPortal(String host, Integer port, String user, String pass, String installPath, String portalJarName, MigrationTask task) { String portalHome = installPath + "portal/"; - ShellUtil.execCommand(host, port, user, pass, "java -Dpath=" + portalHome + " -Dworkspace.id=" + task.getId() + " -Dorder=stop_incremental_migration -Dskip=true -jar " + portalHome + portalJarName); + ShellUtil.execCommand(host, port, user, pass, "java -Dpath=" + portalHome + + " -Dworkspace.id=" + task.getId() + " -Dorder.invoked.timestamp=" + task.getOrderInvokedTimestamp() + + " -Dorder=stop_incremental_migration -Dskip=true -jar " + portalHome + portalJarName); } public static void startReversePortal(String host, Integer port, String user, String pass, String installPath, String portalJarName, MigrationTask task) { String portalHome = installPath + "portal/"; - ShellUtil.execCommand(host, port, user, pass, "java -Dpath=" + portalHome + " -Dworkspace.id=" + task.getId() + " -Dorder=run_reverse_migration -Dskip=true -jar " + portalHome + portalJarName); + ShellUtil.execCommand(host, port, user, pass, "java -Dpath=" + portalHome + + " -Dworkspace.id=" + task.getId() + " -Dorder.invoked.timestamp=" + task.getOrderInvokedTimestamp() + + " -Dorder=run_reverse_migration -Dskip=true -jar " + portalHome + portalJarName); } public static String getPortalStatus(String host, Integer port, String user, String pass, String installPath, MigrationTask task) { diff --git a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/service/impl/MigrationMainTaskServiceImpl.java b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/service/impl/MigrationMainTaskServiceImpl.java index 7279710712a751f48e9d78893a7fe54a61cec60c..42c7b170888e0cf6255168124abd3dbee91d6dd8 100644 --- a/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/service/impl/MigrationMainTaskServiceImpl.java +++ b/plugins/data-migration/src/main/java/org/opengauss/admin/plugin/service/impl/MigrationMainTaskServiceImpl.java @@ -531,6 +531,8 @@ public class MigrationMainTaskServiceImpl extends ServiceImpl