提交 e36c870c authored 作者: Thomas Mueller's avatar Thomas Mueller

There was a possibility that the .lock.db file was not deleted when the database…

There was a possibility that the .lock.db file was not deleted when the database was closed, which could slow down opening the database.
上级 26d7eb12
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>The SQL script generated by the "script" command contained <ul><li>There was a possibility that the .lock.db file was not deleted
when the database was closed, which could slow down opening the database.
</li><li>The SQL script generated by the "script" command contained
inconsistent newlines on Windows. inconsistent newlines on Windows.
</li><li>When using trace level 4 (SLF4J) in the server mode, a directory "trace.db" </li><li>When using trace level 4 (SLF4J) in the server mode, a directory "trace.db"
and an empty file was created on the client side. This is no longer made. and an empty file was created on the client side. This is no longer made.
......
...@@ -148,6 +148,14 @@ public class FileLock implements Runnable { ...@@ -148,6 +148,14 @@ public class FileLock implements Runnable {
if (!locked) { if (!locked) {
return; return;
} }
locked = false;
try {
if (watchdog != null) {
watchdog.interrupt();
}
} catch (Exception e) {
trace.debug(e, "unlock");
}
try { try {
if (fileName != null) { if (fileName != null) {
if (load().equals(properties)) { if (load().equals(properties)) {
...@@ -162,14 +170,6 @@ public class FileLock implements Runnable { ...@@ -162,14 +170,6 @@ public class FileLock implements Runnable {
} finally { } finally {
fileName = null; fileName = null;
serverSocket = null; serverSocket = null;
locked = false;
}
try {
if (watchdog != null) {
watchdog.interrupt();
}
} catch (Exception e) {
trace.debug(e, "unlock");
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论