提交 38f76b45 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 b02ed257
......@@ -621,28 +621,28 @@ public class DiskFile implements CacheWriter {
setPageOwner(page, FREE_PAGE);
} else {
int todoTestThis;
synchronized (potentiallyFreePages) {
potentiallyFreePages.add(ObjectUtils.getInteger(page));
if (potentiallyFreePages.size() > 20) {
Session[] sessions = database.getSessions();
int oldest = 0;
for (int i = 0; i < sessions.length; i++) {
int deleteId = sessions[i].getLastUncommittedDelete();
if (oldest == 0 || deleteId < oldest) {
oldest = deleteId;
}
}
for (Iterator it = potentiallyFreePages.iterator(); it.hasNext();) {
int p = ((Integer) it.next()).intValue();
if (oldest == 0 || oldest > pageDelete.get(p)) {
setPageOwner(p, FREE_PAGE);
//int testing;
//System.out.println("free page " + p);
it.remove();
}
}
}
}
// synchronized (potentiallyFreePages) {
// potentiallyFreePages.add(ObjectUtils.getInteger(page));
// if (potentiallyFreePages.size() > 20) {
// Session[] sessions = database.getSessions();
// int oldest = 0;
// for (int i = 0; i < sessions.length; i++) {
// int deleteId = sessions[i].getLastUncommittedDelete();
// if (oldest == 0 || deleteId < oldest) {
// oldest = deleteId;
// }
// }
// for (Iterator it = potentiallyFreePages.iterator(); it.hasNext();) {
// int p = ((Integer) it.next()).intValue();
// if (oldest == 0 || oldest > pageDelete.get(p)) {
// setPageOwner(p, FREE_PAGE);
////int testing;
////System.out.println("free page " + p);
// it.remove();
// }
// }
// }
// }
}
}
......
......@@ -150,6 +150,8 @@ java org.h2.test.TestAll timer
TestAll test = new TestAll();
test.printSystem();
new TestCrashAPI().init(test).testCase(2005340068);
/*
Test space re-use
......@@ -410,8 +412,8 @@ DROP TABLE MY_TEST;
int todo;
// new TestLogFile().runTest(this);
new TestMemoryUsage().runTest(this);
new TestMultiConn().runTest(this);
new TestMultiDimension().runTest(this);
new TestMultiThread().runTest(this);
......@@ -424,7 +426,10 @@ DROP TABLE MY_TEST;
new TestSQLInjection().runTest(this);
new TestSessionsLocks().runTest(this);
new TestSequence().runTest(this);
new TestSpaceReuse().runTest(this);
int todo2;
// new TestSpaceReuse().runTest(this);
new TestSpeed().runTest(this);
new TestTempTables().runTest(this);
new TestTransaction().runTest(this);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论