[Bug] Fix thread safe problem when check whether olap table is stable (#5478)
This commit is contained in:
@ -194,11 +194,11 @@ public abstract class AlterJobV2 implements Writable {
|
||||
throw new AlterCancelException(e.getMessage());
|
||||
}
|
||||
|
||||
boolean isStable = tbl.isStable(Catalog.getCurrentSystemInfo(),
|
||||
Catalog.getCurrentCatalog().getTabletScheduler(), db.getClusterName());
|
||||
|
||||
tbl.writeLock();
|
||||
try {
|
||||
boolean isStable = tbl.isStable(Catalog.getCurrentSystemInfo(),
|
||||
Catalog.getCurrentCatalog().getTabletScheduler(), db.getClusterName());
|
||||
|
||||
if (!isStable) {
|
||||
errMsg = "table is unstable";
|
||||
LOG.warn("wait table {} to be stable before doing {} job", tableId, type);
|
||||
|
||||
Reference in New Issue
Block a user