[chore](restore) Add logs about the restore table state (#35363)

This commit is contained in:
walter
2024-05-24 23:28:01 +08:00
committed by yiguolei
parent 806b7d68e4
commit 952875b437

View File

@ -2020,6 +2020,7 @@ public class RestoreJob extends AbstractJob {
for (String tableName : jobInfo.backupOlapTableObjects.keySet()) {
Table tbl = db.getTableNullable(jobInfo.getAliasByOriginNameIfSet(tableName));
if (tbl == null) {
LOG.warn("table {} is not found and skip set state to normal", tableName);
continue;
}
@ -2034,6 +2035,7 @@ public class RestoreJob extends AbstractJob {
try {
if (olapTbl.getState() == OlapTableState.RESTORE
|| olapTbl.getState() == OlapTableState.RESTORE_WITH_LOAD) {
LOG.info("table {} set state from {} to normal", tableName, olapTbl.getState());
olapTbl.setState(OlapTableState.NORMAL);
}
@ -2042,6 +2044,8 @@ public class RestoreJob extends AbstractJob {
String partitionName = partitionEntry.getKey();
Partition partition = olapTbl.getPartition(partitionName);
if (partition == null) {
LOG.warn("table {} partition {} is not found and skip set state to normal",
tableName, partitionName);
continue;
}
if (partition.getState() == PartitionState.RESTORE) {