提交 40cd548a authored 作者: Noel Grandin's avatar Noel Grandin

and fix a meta locking bug the CI found

上级 670b4e10
...@@ -1395,6 +1395,7 @@ public class Database implements DataHandler { ...@@ -1395,6 +1395,7 @@ public class Database implements DataHandler {
if (!readOnly) { if (!readOnly) {
lockMeta(pageStore.getPageStoreSession()); lockMeta(pageStore.getPageStoreSession());
pageStore.compact(compactMode); pageStore.compact(compactMode);
unlockMeta(pageStore.getPageStoreSession());
} }
} catch (DbException e) { } catch (DbException e) {
if (SysProperties.CHECK2) { if (SysProperties.CHECK2) {
......
...@@ -856,10 +856,11 @@ public class Session extends SessionWithState { ...@@ -856,10 +856,11 @@ public class Session extends SessionWithState {
removeTemporaryLobs(false); removeTemporaryLobs(false);
cleanTempTables(true); cleanTempTables(true);
// sometimes Table#removeChildrenAndResources
// will take the meta lock
database.unlockMeta(this);
undoLog.clear(); undoLog.clear();
// Table#removeChildrenAndResources can take the meta lock,
// and we need to unlock before we call removeSession(), which might
// want to take the meta lock using the system session.
database.unlockMeta(this);
database.removeSession(this); database.removeSession(this);
} finally { } finally {
closed = true; closed = true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论