提交 5bbd3964 authored 作者: Thomas Mueller's avatar Thomas Mueller

New experimental database file locking mechanism "FS" to use native file locking.

上级 947b8cd6
......@@ -305,7 +305,15 @@ public class PageStore implements CacheWriter {
}
private void openExisting() {
file = database.openFile(fileName, accessMode, true);
try {
file = database.openFile(fileName, accessMode, true);
} catch (DbException e) {
// in Windows, you can't open a locked file
// (in other operating systems, you can)
if (e.getErrorCode() == ErrorCode.IO_EXCEPTION_2) {
throw DbException.get(ErrorCode.DATABASE_ALREADY_OPEN_1, e, fileName);
}
}
lockFile();
readStaticHeader();
freeListPagesPerList = PageFreeList.getPagesAddressed(pageSize);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论