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

The message "Transaction log could not be truncated" was sometimes written to…

The message "Transaction log could not be truncated" was sometimes written to the .trace.db file even if there was no problem truncating the transaction log.
上级 780c79e5
......@@ -684,6 +684,10 @@ public class PageLog {
return logSectionId;
}
int getLogFirstSectionId() {
return firstSectionId;
}
long getLogPos() {
return logPos;
}
......
......@@ -1434,10 +1434,17 @@ public class PageStore implements CacheWriter {
log.commit(session.getId());
long size = log.getSize();
if (size - logSizeBase > maxLogSize) {
int firstSection = log.getLogFirstSectionId();
checkpoint();
if (ignoreBigLog) {
return;
}
int newSection = log.getLogSectionId();
if (newSection - firstSection <= 2) {
// one section is always kept, and checkpoint
// advances two sections each time it is called
return;
}
long newSize = log.getSize();
if (newSize < size || size < maxLogSize) {
ignoreBigLog = false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论