提交 fc03511a authored 作者: christian.peter.io's avatar christian.peter.io

Serialized mode: wait before deleting the .lock file, otherwise other…

Serialized mode: wait before deleting the .lock file, otherwise other connections can not detect that
上级 cb4c607a
......@@ -1320,11 +1320,16 @@ public class Database implements DataHandler {
systemSession = null;
}
if (lock != null) {
if (fileLockMethod != FileLock.LOCK_SERIALIZED) {
// must not delete the .lock file if we wrote something,
if (fileLockMethod == FileLock.LOCK_SERIALIZED) {
// wait before deleting the .lock file,
// otherwise other connections can not detect that
lock.unlock();
try {
Thread.sleep((int) (SysProperties.RECONNECT_CHECK_DELAY * 1.1));
} catch (InterruptedException e) {
traceSystem.getTrace(Trace.DATABASE).error("close", e);
}
}
lock.unlock();
lock = null;
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论