[fix](mtmv)fix mtmv dead lock (#37009) (#37133)

pick https://github.com/apache/doris/pull/37009
This commit is contained in:
zhangdong
2024-07-02 23:01:31 +08:00
committed by GitHub
parent 6716f9e736
commit 177764647d

View File

@ -901,7 +901,7 @@ public class Alter {
Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(tbl.getDb());
mtmv = (MTMV) db.getTableOrMetaException(tbl.getTbl(), TableType.MATERIALIZED_VIEW);
mtmv.writeLock();
mtmv.writeMvLock();
switch (alterMTMV.getOpType()) {
case ALTER_REFRESH_INFO:
mtmv.alterRefreshInfo(alterMTMV.getRefreshInfo());
@ -930,7 +930,7 @@ public class Alter {
LOG.warn(e);
} finally {
if (mtmv != null) {
mtmv.writeUnlock();
mtmv.writeMvUnlock();
}
}
}