提交 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 {
if (!readOnly) {
lockMeta(pageStore.getPageStoreSession());
pageStore.compact(compactMode);
unlockMeta(pageStore.getPageStoreSession());
}
} catch (DbException e) {
if (SysProperties.CHECK2) {
......
......@@ -856,10 +856,11 @@ public class Session extends SessionWithState {
removeTemporaryLobs(false);
cleanTempTables(true);
// sometimes Table#removeChildrenAndResources
// will take the meta lock
database.unlockMeta(this);
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);
} finally {
closed = true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论