提交 5bf28552 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting / documentation

上级 d4636a49
......@@ -469,7 +469,7 @@ This is work in progress. To try it out, append
to the database URL. In general, performance should be
similar than the current default storage engine (the page store).
Even though it can be used with the default table level locking,
it is recommended to use it together with the MVCC mode
it is recommended to use it together with the MVCC mode
(to do that, append <code>;MVCC=TRUE</code> to the database URL).
</p>
......
......@@ -7538,7 +7538,7 @@ ConcurrentModificationException
Storage Engine for H2
@mvstore_1115_p
The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete, for example the <code>.lock.db</code> file is still used to lock a database (the plan is to no longer use this file by default).
The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, performance should be similar than the current default storage engine (the page store). Even though it can be used with the default table level locking, it is recommended to use it together with the MVCC mode (to do that, append <code>;MVCC=TRUE</code> to the database URL).
@mvstore_1116_h2
Similar Projects and Differences to Other Storage Engines
......@@ -7559,7 +7559,7 @@ Similar Projects and Differences to Other Storage Engines
Current State
@mvstore_1122_p
The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even though the main features will stay).
@mvstore_1123_h2
Requirements
......
......@@ -7538,7 +7538,7 @@ H2 データベース エンジン
#Storage Engine for H2
@mvstore_1115_p
# The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete, for example the <code>.lock.db</code> file is still used to lock a database (the plan is to no longer use this file by default).
# The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE=TRUE</code> to the database URL. In general, performance should be similar than the current default storage engine (the page store). Even though it can be used with the default table level locking, it is recommended to use it together with the MVCC mode (to do that, append <code>;MVCC=TRUE</code> to the database URL).
@mvstore_1116_h2
#Similar Projects and Differences to Other Storage Engines
......@@ -7559,7 +7559,7 @@ H2 データベース エンジン
#Current State
@mvstore_1122_p
# The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
# The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even though the main features will stay).
@mvstore_1123_h2
必�?�?�件
......
......@@ -2511,14 +2511,14 @@ mvstore_1111_li=\ if a method was called that is not supported, for example tryi
mvstore_1112_code=ConcurrentModificationException
mvstore_1113_li=\ if a map is modified concurrently.
mvstore_1114_h3=Storage Engine for H2
mvstore_1115_p=\ The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE\=TRUE</code> to the database URL. In general, functionality and performance should be similar than the current default storage engine (the page store). There are a few features that have not been implemented yet or are not complete, for example the <code>.lock.db</code> file is still used to lock a database (the plan is to no longer use this file by default).
mvstore_1115_p=\ The plan is to use the MVStore as the default storage engine for the H2 database in the future (supporting SQL, JDBC, transactions, MVCC, and so on). This is work in progress. To try it out, append <code>;MV_STORE\=TRUE</code> to the database URL. In general, performance should be similar than the current default storage engine (the page store). Even though it can be used with the default table level locking, it is recommended to use it together with the MVCC mode (to do that, append <code>;MVCC\=TRUE</code> to the database URL).
mvstore_1116_h2=Similar Projects and Differences to Other Storage Engines
mvstore_1117_p=\ Unlike similar storage engines like LevelDB and Kyoto Cabinet, the MVStore is written in Java and can easily be embedded in a Java and Android application.
mvstore_1118_p=\ The MVStore is somewhat similar to the Berkeley DB Java Edition because it is also written in Java, and is also a log structured storage, but the H2 license is more liberal.
mvstore_1119_p=\ Like SQLite 3, the MVStore keeps all data in one file. Unlike SQLite 3, the MVStore uses is a log structured storage. The plan is to make the MVStore both easier to use as well as faster than SQLite 3. In a recent (very simple) test, the MVStore was about twice as fast as SQLite 3 on Android.
mvstore_1120_p=\ The API of the MVStore is similar to MapDB (previously known as JDBM) from Jan Kotek, and some code is shared between MVStore and MapDB. However, unlike MapDB, the MVStore uses is a log structured storage. The MVStore does not have a record size limit.
mvstore_1121_h2=Current State
mvstore_1122_p=\ The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even thought the main features will stay).
mvstore_1122_p=\ The code is still experimental at this stage. The API as well as the behavior may partially change. Features may be added and removed (even though the main features will stay).
mvstore_1123_h2=Requirements
mvstore_1124_p=\ The MVStore is included in the latest H2 jar file.
mvstore_1125_p=\ There are no special requirements to use it. The MVStore should run on any JVM as well as on Android.
......
......@@ -105,7 +105,7 @@ public class Explain extends Prepared {
int percent = (int) (100L * value / total);
buff.append(e.getKey()).append(": ").append(value);
if (statistics.size() > 1) {
buff.append(" (").append(percent).append("%)");
buff.append(" (").append(percent).append("%)");
}
buff.append('\n');
}
......
......@@ -51,7 +51,7 @@ TestMVStoreDataLoss
MVTableEngine:
- verify tests don't use the PageStore
- test and possibly allow MVCC & MULTI_THREADED
- maybe enable MVCC by default (but allow to disable it)
- maybe enable MVCC by default (but allow to disable it)
- use StreamStore to avoid deadlocks
TransactionStore:
......@@ -456,10 +456,10 @@ public class MVStore {
maps.put(id, map);
return map;
}
/**
* Get the set of all map names.
*
*
* @return the set of names
*/
public synchronized Set<String> getMapNames() {
......
......@@ -280,7 +280,7 @@ public class MVPrimaryIndex extends BaseIndex {
/**
* The maximum number of rows, including uncommitted rows of any session.
*
*
* @return the maximum number of rows
*/
public long getRowCountMax() {
......
......@@ -140,7 +140,7 @@ public class MVTableEngine implements TableEngine {
* The transaction store.
*/
private final TransactionStore transactionStore;
private long statisticsStart;
public Store(Database db, MVStore store) {
......
......@@ -66,7 +66,7 @@ public class TransactionStore {
private int lastTransactionId;
private int maxTransactionId = 0xffff;
/**
* The next id of a temporary map.
*/
......@@ -393,15 +393,20 @@ public class TransactionStore {
maps.put(mapId, map);
return map;
}
/**
* Create a temporary map. Such maps are removed when opening the store.
*
* @return the map
*/
synchronized MVMap<Object, Integer> createTempMap() {
String mapName = "temp." + nextTempMapId++;
return openTempMap(mapName);
}
/**
* Open a temporary map.
*
*
* @param mapName the map name
* @return the map
*/
......@@ -864,7 +869,7 @@ public class TransactionStore {
/**
* Get the size of the raw map. This includes uncommitted entries, and
* transiently removed entries, so it is the maximum number of entries.
*
*
* @return the maximum size
*/
public long sizeAsLongMax() {
......
......@@ -1297,7 +1297,7 @@ public class TestMVStore extends TestBase {
assertEquals(1, s.getCurrentVersion());
assertTrue(m.containsKey("chunk.1"));
assertFalse(m.containsKey("chunk.2"));
assertEquals("[data]", s.getMapNames().toString());
assertEquals("data", s.getMapName(data.getId()));
assertNull(s.getMapName(s.getMetaMap().getId()));
......
......@@ -76,7 +76,7 @@ public class TestMVTableEngine extends TestBase {
if (config.memory) {
return;
}
FileUtils.deleteRecursive(getBaseDir(), true);
Connection conn;
Connection conn2;
......@@ -90,10 +90,10 @@ public class TestMVTableEngine extends TestBase {
stat.execute("create table test2(id int)");
stat.execute("insert into test select x from system_range(1, 10000)");
conn.close();
ResultSet rs;
String plan;
conn2 = getConnection(url);
stat2 = conn2.createStatement();
rs = stat2.executeQuery("explain analyze select count(*) from test");
......@@ -108,7 +108,7 @@ public class TestMVTableEngine extends TestBase {
rs = stat.executeQuery("select count(*) from test");
rs.next();
assertEquals(11000, rs.getInt(1));
// not yet committed
rs = stat2.executeQuery("explain analyze select count(*) from test");
rs.next();
......@@ -118,7 +118,7 @@ public class TestMVTableEngine extends TestBase {
rs = stat2.executeQuery("select count(*) from test");
rs.next();
assertEquals(10000, rs.getInt(1));
stat.execute("insert into test2 select x from system_range(1, 11000)");
rs = stat2.executeQuery("explain analyze select count(*) from test");
rs.next();
......@@ -128,11 +128,11 @@ public class TestMVTableEngine extends TestBase {
rs = stat2.executeQuery("select count(*) from test");
rs.next();
assertEquals(10000, rs.getInt(1));
conn2.close();
conn.close();
}
private void testMinMaxWithNull() throws Exception {
FileUtils.deleteRecursive(getBaseDir(), true);
Connection conn;
......@@ -184,7 +184,7 @@ public class TestMVTableEngine extends TestBase {
conn2.close();
conn.close();
}
private void testExplainAnalyze() throws Exception {
if (config.memory) {
return;
......@@ -196,7 +196,7 @@ public class TestMVTableEngine extends TestBase {
url = getURL(url, true);
conn = getConnection(url);
stat = conn.createStatement();
stat.execute("create table test(id identity, name varchar) as " +
stat.execute("create table test(id identity, name varchar) as " +
"select x, space(1000) from system_range(1, 1000)");
ResultSet rs;
conn.close();
......
......@@ -60,7 +60,7 @@ public class TestTransactionStore extends TestBase {
testSingleConnection();
testCompareWithPostgreSQL();
}
private void testCountWithOpenTransactions() {
MVStore s;
TransactionStore ts;
......@@ -79,7 +79,7 @@ public class TestTransactionStore extends TestBase {
Transaction tx2 = ts.begin();
TransactionMap<Integer, Integer> map2 = tx2.openMap("data");
Random r = new Random(1);
for (int i = 0; i < size * 3; i++) {
assertEquals("op: " + i, size, (int) map1.sizeAsLong());
......@@ -93,7 +93,7 @@ public class TestTransactionStore extends TestBase {
}
s.close();
}
private void testConcurrentUpdate() {
MVStore s;
TransactionStore ts;
......@@ -110,14 +110,14 @@ public class TestTransactionStore extends TestBase {
map2.put(1, 20);
fail();
} catch (IllegalStateException e) {
assertEquals(DataUtils.ERROR_TRANSACTION_LOCKED,
assertEquals(DataUtils.ERROR_TRANSACTION_LOCKED,
DataUtils.getErrorCode(e.getMessage()));
}
assertEquals(10, map1.get(1).intValue());
assertNull(map2.get(1));
tx1.commit();
assertEquals(10, map2.get(1).intValue());
s.close();
}
......
......@@ -750,4 +750,4 @@ thai tme jean cycles surrogate submitting putting purged clue bottlenecks confor
sameorigin nobuffer francois hikari duske phromros thailand kritchai mendonca
maginatics jdbclint lint lsm unmappable adams douglas definer invoker
fmrn fmxxx fmday fml syyyy tzd nov iyy iyyy fmc fmb fmxx tzr btc yyfxyy scc syear
overwrote though
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论