提交 8e7003d9 authored 作者: Thomas Mueller's avatar Thomas Mueller

MVStore: if there is an exception while saving, the store is now in all cases immediately closed.

上级 ac21a340
......@@ -17,9 +17,11 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>In version 1.3.183, indexes that contains columns with a default value
generated by a sequence where not used. This includes identity and auto-increment
columns. This bug was introduced by supporting "rownum" in views and derived tables.
<ul><li>In version 1.3.183, indexes were not used if the table contains
columns with a default value generated by a sequence.
This includes tables with identity and auto-increment columns.
This bug was introduced by supporting "rownum" in views and derived tables.
</li><li>MVStore: if there is an exception while saving, the store is now in all cases immediately closed.
</li></ul>
<h2>Version 1.4.183 Beta (2014-12-13)</h2>
......
......@@ -977,6 +977,15 @@ public class MVStore {
}
private long storeNow() {
try {
return storeNowTry();
} catch (IllegalStateException e) {
panic(e);
return -1;
}
}
private long storeNowTry() {
freeUnusedChunks();
int currentUnsavedPageCount = unsavedMemory;
long storeVersion = currentStoreVersion;
......@@ -1156,17 +1165,13 @@ public class MVStore {
shrinkFileIfPossible(1);
}
try {
for (MVMap<?, ?> m : changed) {
Page p = m.getRoot();
if (p.getTotalCount() > 0) {
p.writeEnd();
}
for (MVMap<?, ?> m : changed) {
Page p = m.getRoot();
if (p.getTotalCount() > 0) {
p.writeEnd();
}
metaRoot.writeEnd();
} catch (IllegalStateException e) {
panic(e);
}
metaRoot.writeEnd();
// some pages might have been changed in the meantime (in the newest
// version)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论