提交 33f44932 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved error message.

上级 df729058
...@@ -718,12 +718,18 @@ public class PageLog { ...@@ -718,12 +718,18 @@ public class PageLog {
*/ */
private int removeUntil(int trunkPage, int firstDataPageToKeep) { private int removeUntil(int trunkPage, int firstDataPageToKeep) {
trace.debug("log.removeUntil " + trunkPage + " " + firstDataPageToKeep); trace.debug("log.removeUntil " + trunkPage + " " + firstDataPageToKeep);
int last = trunkPage;
while (true) { while (true) {
Page p = store.getPage(trunkPage); Page p = store.getPage(trunkPage);
PageStreamTrunk t = (PageStreamTrunk) p; PageStreamTrunk t = (PageStreamTrunk) p;
if (t == null) {
throw DbException.throwInternalError(
"log.removeUntil not found: " + firstDataPageToKeep + " last " + last);
}
logKey = t.getLogKey(); logKey = t.getLogKey();
last = t.getPos();
if (t.contains(firstDataPageToKeep)) { if (t.contains(firstDataPageToKeep)) {
return t.getPos(); return last;
} }
trunkPage = t.getNextTrunk(); trunkPage = t.getNextTrunk();
IntArray list = new IntArray(); IntArray list = new IntArray();
......
...@@ -1458,7 +1458,9 @@ public class PageStore implements CacheWriter { ...@@ -1458,7 +1458,9 @@ public class PageStore implements CacheWriter {
} }
} }
trace.info("Rolling back session #" +oldestSession.getId() + " (the oldest uncommitted)"); trace.info("Rolling back session #" +oldestSession.getId() + " (the oldest uncommitted)");
synchronized (oldestSession) {
oldestSession.rollback(); oldestSession.rollback();
}
logSizeBase = log.getSize(); logSizeBase = log.getSize();
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论