提交 bacab9bc authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Documentation / Tests / Build

上级 966c6c1a
...@@ -21,8 +21,9 @@ Change Log ...@@ -21,8 +21,9 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>Windows / PageStore storage: the cooperative file locking mechanism <li>PageStore storage: the cooperative file locking mechanism
did not always work as expected. did not always work as expected (with very slow computers).
</li>
<li>Temporary CLOB and BLOB objects are now removed while the database is open <li>Temporary CLOB and BLOB objects are now removed while the database is open
(and not just when closing the database). (and not just when closing the database).
</li> </li>
......
...@@ -2031,26 +2031,30 @@ public class TestMVStore extends TestBase { ...@@ -2031,26 +2031,30 @@ public class TestMVStore extends TestBase {
FileUtils.delete(fileName); FileUtils.delete(fileName);
MVStore store = new MVStore.Builder().cacheSize(16). MVStore store = new MVStore.Builder().cacheSize(16).
fileName(fileName).open(); fileName(fileName).open();
MVMap<Integer, String> map = store.openMap("test"); try {
long last = System.currentTimeMillis(); MVMap<Integer, String> map = store.openMap("test");
String data = new String(new char[2500]).replace((char) 0, 'x'); long last = System.currentTimeMillis();
for (int i = 0;; i++) { String data = new String(new char[2500]).replace((char) 0, 'x');
map.put(i, data); for (int i = 0;; i++) {
if (i % 10000 == 0) { map.put(i, data);
store.commit(); if (i % 10000 == 0) {
long time = System.currentTimeMillis(); store.commit();
if (time - last > 2000) { long time = System.currentTimeMillis();
long mb = store.getFileStore().size() / 1024 / 1024; if (time - last > 2000) {
trace(mb + "/4500"); long mb = store.getFileStore().size() / 1024 / 1024;
if (mb > 4500) { trace(mb + "/4500");
break; if (mb > 4500) {
break;
}
last = time;
} }
last = time;
} }
} }
store.commit();
store.close();
} finally {
store.closeImmediately();
} }
store.commit();
store.close();
FileUtils.delete(fileName); FileUtils.delete(fileName);
} }
......
...@@ -190,6 +190,9 @@ public class CheckTextFiles { ...@@ -190,6 +190,9 @@ public class CheckTextFiles {
line++; line++;
int lineLength = i - startLinePos; int lineLength = i - startLinePos;
if (file.getName().endsWith(".java")) { if (file.getName().endsWith(".java")) {
if (useCRLF) {
lineLength--;
}
if (lineLength > MAX_SOURCE_LINE_SIZE) { if (lineLength > MAX_SOURCE_LINE_SIZE) {
fail(file, "line too long: " + lineLength, line); fail(file, "line too long: " + lineLength, line);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论