[Bug] Fix null pointer when replay RollupJob (#4572)

When fe replay rollup job(v1) with deleted table, it will throw null pointer exception and exit.
This commit ignore this error and print a warning log to avoid fe exit.

Fixed #4571

Change-Id: I302b554a94d42aee645db6b224cd989e00cd3ca6
This commit is contained in:
EmmyMiao87
2020-09-10 11:55:14 +08:00
committed by GitHub
parent 7d3fae1257
commit c4feb82229

View File

@ -903,6 +903,10 @@ public class RollupJob extends AlterJob {
db.writeLock();
try {
OlapTable olapTable = (OlapTable) db.getTable(tableId);
if (olapTable == null) {
LOG.warn("table {} could not be found when replay rollup job", tableId);
return;
}
olapTable.setState(OlapTableState.NORMAL);
} finally {
db.writeUnlock();