提交 769c0f94 authored 作者: noelgrandin@gmail.com's avatar noelgrandin@gmail.com

take a local copy so we don't see inconsistent data

上级 9f1c68cc
......@@ -313,10 +313,13 @@ public class MVTable extends TableBase {
}
}
}
if (error == null && lockExclusiveSession != null) {
Table t = lockExclusiveSession.getWaitForLock();
// take a local copy so we don't see inconsistent data, since we are not locked
// while checking the lockExclusiveSession value
Session copyOfLockExclusiveSession = lockExclusiveSession;
if (error == null && copyOfLockExclusiveSession != null) {
Table t = copyOfLockExclusiveSession.getWaitForLock();
if (t != null) {
error = t.checkDeadlock(lockExclusiveSession, clash,
error = t.checkDeadlock(copyOfLockExclusiveSession, clash,
visited);
if (error != null) {
error.add(session);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论