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

MVStore: simpler API

上级 5f5eb72d
...@@ -1261,7 +1261,6 @@ public class Database implements DataHandler { ...@@ -1261,7 +1261,6 @@ public class Database implements DataHandler {
reconnectModified(false); reconnectModified(false);
if (mvStore != null) { if (mvStore != null) {
if (!readOnly && compactMode != 0) { if (!readOnly && compactMode != 0) {
mvStore.store();
mvStore.compactFile(dbSettings.maxCompactTime); mvStore.compactFile(dbSettings.maxCompactTime);
} else { } else {
mvStore.close(dbSettings.maxCompactTime); mvStore.close(dbSettings.maxCompactTime);
...@@ -1787,7 +1786,7 @@ public class Database implements DataHandler { ...@@ -1787,7 +1786,7 @@ public class Database implements DataHandler {
} }
if (mvStore != null) { if (mvStore != null) {
int millis = value < 0 ? 0 : value; int millis = value < 0 ? 0 : value;
mvStore.getStore().setWriteDelay(millis); mvStore.getStore().setAutoCommitDelay(millis);
} }
} }
...@@ -1892,7 +1891,7 @@ public class Database implements DataHandler { ...@@ -1892,7 +1891,7 @@ public class Database implements DataHandler {
} }
if (mvStore != null) { if (mvStore != null) {
try { try {
mvStore.store(); mvStore.flush();
} catch (RuntimeException e) { } catch (RuntimeException e) {
backgroundException = DbException.convert(e); backgroundException = DbException.convert(e);
throw e; throw e;
...@@ -2407,7 +2406,7 @@ public class Database implements DataHandler { ...@@ -2407,7 +2406,7 @@ public class Database implements DataHandler {
} }
} }
if (mvStore != null) { if (mvStore != null) {
mvStore.store(); mvStore.flush();
} }
} }
getTempFileDeleter().deleteUnused(); getTempFileDeleter().deleteUnused();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论