提交 3e4c4489 authored 作者: Noel Grandin's avatar Noel Grandin

fix abba deadlock in Sequence.flushInternal

after my previous commit which removed the use of the system session. Since we are taking the meta lock here, we don't need any extra synchronization
上级 f2e6dd8e
...@@ -32,7 +32,6 @@ public class Sequence extends SchemaObjectBase { ...@@ -32,7 +32,6 @@ public class Sequence extends SchemaObjectBase {
private long maxValue; private long maxValue;
private boolean cycle; private boolean cycle;
private boolean belongsToTable; private boolean belongsToTable;
private final Object flushSync = new Object();
private boolean writeWithMargin; private boolean writeWithMargin;
/** /**
...@@ -306,7 +305,6 @@ public class Sequence extends SchemaObjectBase { ...@@ -306,7 +305,6 @@ public class Sequence extends SchemaObjectBase {
} }
private void flushInternal(Session session) { private void flushInternal(Session session) {
synchronized (flushSync) {
final boolean metaWasLocked = database.lockMeta(session); final boolean metaWasLocked = database.lockMeta(session);
// just for this case, use the value with the margin // just for this case, use the value with the margin
try { try {
...@@ -319,7 +317,6 @@ public class Sequence extends SchemaObjectBase { ...@@ -319,7 +317,6 @@ public class Sequence extends SchemaObjectBase {
database.unlockMeta(session); database.unlockMeta(session);
} }
} }
}
/** /**
* Flush the current value to disk and close this object. * Flush the current value to disk and close this object.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论