提交 14111f79 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting and documentation

上级 12500cfb
......@@ -27,15 +27,18 @@ Change Log
</li><li>File system abstraction: support replacing existing files using move
(currently not for Windows).
</li><li>The statement "shutdown defrag" now compresses the database (with the MVStore).
</li><li>The MVStore now automatically shrinks the file in the background if there is no read or write activity.
This might be a bit too aggressive; feedback is welcome!
This command can greatly reduce the file size, and is relatively fast,
but is not incremental.
</li><li>The MVStore now automatically compacts the store in the background if there is no read or write activity,
which should (after some time; sometimes about one minute) reduce the file size.
This is still work in progress, feedback is welcome!
</li><li>Change default value of PAGE_SIZE from 2048 to 4096 to more closely match most file systems block size
(PageStore only; the MVStore already used 4096).
</li><li>Auto-scale MAX_MEMORY_ROWS and CACHE_SIZE settings by the amount of available RAM. Gives a better
out of box experience for people with more powerful machines.
</li><li>Handle tabs like 4 spaces in web console, patch by Martin Grajcar
</li><li>Handle tabs like 4 spaces in web console, patch by Martin Grajcar.
</li><li>Issue 573: Add implementation for Methods "isWrapperFor()" and "unwrap()" in JdbcConnection.java,
patch by BigMichi1
patch by BigMichi1.
</li></ul>
<h2>Version 1.4.180 Beta (2014-07-13)</h2>
......
......@@ -1767,6 +1767,7 @@ public class JdbcConnection extends TraceObject implements Connection {
* Return an object of this class if possible.
*
* @param iface the class
* @return this
*/
@Override
@SuppressWarnings("unchecked")
......@@ -1781,10 +1782,11 @@ public class JdbcConnection extends TraceObject implements Connection {
* Checks if unwrap can return an object of this class.
*
* @param iface the class
* @return whether or not the interface is assignable from this class
*/
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return (iface != null && iface.isAssignableFrom(getClass()));
return iface != null && iface.isAssignableFrom(getClass());
}
/**
......
......@@ -849,11 +849,6 @@ public class MVStore {
return c;
}
boolean isChunkKnown(long pos) {
int chunkId = DataUtils.getPageChunkId(pos);
return chunks.containsKey(chunkId);
}
private Chunk getChunkIfFound(long pos) {
int chunkId = DataUtils.getPageChunkId(pos);
Chunk c = chunks.get(chunkId);
......@@ -1761,9 +1756,6 @@ public class MVStore {
}
}
if (!pendingChanges) {
;
new Exception(fileStore.getFileName() + " chunk " + chunk.id + " fix live! " + chunk).printStackTrace(System.out);
// bookkeeping is broken for this chunk:
// fix it
registerFreePage(currentVersion, chunk.id,
......
......@@ -1399,7 +1399,8 @@ public class TransactionStore {
k = cursor.next();
} catch (IllegalStateException e) {
// TODO this is a bit ugly
if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
if (DataUtils.getErrorCode(e.getMessage()) ==
DataUtils.ERROR_CHUNK_NOT_FOUND) {
cursor = map.cursor(currentKey);
// we (should) get the current key again,
// we need to ignore that one
......@@ -1469,7 +1470,8 @@ public class TransactionStore {
k = cursor.next();
} catch (IllegalStateException e) {
// TODO this is a bit ugly
if (DataUtils.getErrorCode(e.getMessage()) == DataUtils.ERROR_CHUNK_NOT_FOUND) {
if (DataUtils.getErrorCode(e.getMessage()) ==
DataUtils.ERROR_CHUNK_NOT_FOUND) {
cursor = map.cursor(currentKey);
// we (should) get the current key again,
// we need to ignore that one
......
......@@ -82,12 +82,15 @@ public class TestMVTableEngine extends TestBase {
private void testLowRetentionTime() throws SQLException {
deleteDb("testLowRetentionTime");
Connection conn = getConnection("testLowRetentionTime;RETENTION_TIME=10;WRITE_DELAY=10");
Connection conn = getConnection(
"testLowRetentionTime;RETENTION_TIME=10;WRITE_DELAY=10");
Statement stat = conn.createStatement();
Connection conn2 = getConnection("testLowRetentionTime");
Statement stat2 = conn2.createStatement();
stat.execute("create alias sleep as $$void sleep(int ms) throws Exception { Thread.sleep(ms); }$$");
stat.execute("create table test(id identity, name varchar) as select x, 'Init' from system_range(0, 1999)");
stat.execute("create alias sleep as " +
"$$void sleep(int ms) throws Exception { Thread.sleep(ms); }$$");
stat.execute("create table test(id identity, name varchar) " +
"as select x, 'Init' from system_range(0, 1999)");
for (int i = 0; i < 10; i++) {
stat.execute("insert into test values(null, 'Hello')");
// create and delete a large table: this will force compaction
......
......@@ -761,4 +761,4 @@ reinstated uninteresting dead defendant doctrines beat factual fair suspended
exploit noise ongoing disclaimers shrinks remedy party desirable timely construe
deque synchronizers affero kevent nikolaj hohmuth grajcar jens fogh hostnames
operate resized jni yjp ownable starvation reaper biased introduce epoll hangs
compaction aggressive powerful
compaction aggressive powerful traversing pietrzak michi karl
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论