提交 bfca1799 authored 作者: noelgrandin's avatar noelgrandin

somebody reported an error, and they think the PageStore#changeCount field has…

somebody reported an error, and they think the PageStore#changeCount field has wrapped and become negative.
Put a check in place to make such a situation more obvious.
上级 99655cf1
......@@ -714,6 +714,9 @@ public class PageStore implements CacheWriter {
p.moveTo(pageStoreSession, free);
} finally {
changeCount++;
if (SysProperties.CHECK && changeCount < 0) {
throw DbException.throwInternalError("changeCount has wrapped");
}
}
}
return true;
......@@ -1947,6 +1950,9 @@ public class PageStore implements CacheWriter {
*/
public void incrementChangeCount() {
changeCount++;
if (SysProperties.CHECK && changeCount < 0) {
throw DbException.throwInternalError("changeCount has wrapped");
}
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论