This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 620653f1d4d [fix](mtmv)fix mtmv dead lock (#37009)
620653f1d4d is described below
commit 620653f1d4d143b3e862d2810bb27a1e9105ff2f
Author: zhangdong <[email protected]>
AuthorDate: Fri Jun 28 21:09:35 2024 +0800
[fix](mtmv)fix mtmv dead lock (#37009)
Cause of occurrence:
- dropBaseTable: Holding db's writeLock ,notify mtmv alter status to
schema_change,need mv's writeLock
- task(insert overwrite):Holding mv's readLock,when generage plan need
db's readLock
fix:
- mtmv alter status to schema_change need mv's writeMvLock instead of
mv's writeLock
---
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
b/fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
index a029f604dfd..26045f8527a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java
@@ -916,7 +916,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());
@@ -945,7 +945,7 @@ public class Alter {
LOG.warn(e);
} finally {
if (mtmv != null) {
- mtmv.writeUnlock();
+ mtmv.writeMvUnlock();
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]