提交 08748cc1 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 80cb1fa8
...@@ -71,7 +71,7 @@ public class MVPrimaryIndex extends BaseIndex { ...@@ -71,7 +71,7 @@ public class MVPrimaryIndex extends BaseIndex {
ValueDataType valueType = new ValueDataType(db.getCompareMode(), db, ValueDataType valueType = new ValueDataType(db.getCompareMode(), db,
sortTypes); sortTypes);
mapName = "table." + getId(); mapName = "table." + getId();
Transaction t = mvTable.getTransaction(null); Transaction t = mvTable.getTransaction(null);
dataMap = t.openMap(mapName, keyType, valueType); dataMap = t.openMap(mapName, keyType, valueType);
t.commit(); t.commit();
if (!table.isPersistData()) { if (!table.isPersistData()) {
......
...@@ -68,7 +68,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -68,7 +68,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex {
ValueDataType keyType = new ValueDataType( ValueDataType keyType = new ValueDataType(
db.getCompareMode(), db, sortTypes); db.getCompareMode(), db, sortTypes);
ValueDataType valueType = new ValueDataType(null, null, null); ValueDataType valueType = new ValueDataType(null, null, null);
Transaction t = mvTable.getTransaction(null); Transaction t = mvTable.getTransaction(null);
dataMap = t.openMap(mapName, keyType, valueType); dataMap = t.openMap(mapName, keyType, valueType);
t.commit(); t.commit();
if (!keyType.equals(dataMap.getKeyType())) { if (!keyType.equals(dataMap.getKeyType())) {
...@@ -219,7 +219,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -219,7 +219,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex {
} }
} }
} }
private void checkUnique(SearchRow row, TransactionMap<Value, Value> map, ValueArray unique) { private void checkUnique(SearchRow row, TransactionMap<Value, Value> map, ValueArray unique) {
Iterator<Value> it = map.keyIterator(unique, true); Iterator<Value> it = map.keyIterator(unique, true);
while (it.hasNext()) { while (it.hasNext()) {
...@@ -232,7 +232,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -232,7 +232,7 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex {
if (!containsNullAndAllowMultipleNull(r2)) { if (!containsNullAndAllowMultipleNull(r2)) {
throw getDuplicateKeyException(k.toString()); throw getDuplicateKeyException(k.toString());
} }
} }
} }
} }
......
...@@ -102,7 +102,7 @@ public class MVSpatialIndex extends BaseIndex implements SpatialIndex, MVIndex { ...@@ -102,7 +102,7 @@ public class MVSpatialIndex extends BaseIndex implements SpatialIndex, MVIndex {
new MVRTreeMap.Builder<VersionedValue>(). new MVRTreeMap.Builder<VersionedValue>().
valueType(valueType); valueType(valueType);
spatialMap = db.getMvStore().getStore().openMap(mapName, mapBuilder); spatialMap = db.getMvStore().getStore().openMap(mapName, mapBuilder);
Transaction t = mvTable.getTransaction(null); Transaction t = mvTable.getTransaction(null);
dataMap = t.openMap(spatialMap); dataMap = t.openMap(spatialMap);
t.commit(); t.commit();
} }
......
...@@ -313,8 +313,8 @@ public class MVTable extends TableBase { ...@@ -313,8 +313,8 @@ public class MVTable extends TableBase {
} }
} }
} }
// take a local copy so we don't see inconsistent data, since we are not locked // take a local copy so we don't see inconsistent data, since we are
// while checking the lockExclusiveSession value // not locked while checking the lockExclusiveSession value
Session copyOfLockExclusiveSession = lockExclusiveSession; Session copyOfLockExclusiveSession = lockExclusiveSession;
if (error == null && copyOfLockExclusiveSession != null) { if (error == null && copyOfLockExclusiveSession != null) {
Table t = copyOfLockExclusiveSession.getWaitForLock(); Table t = copyOfLockExclusiveSession.getWaitForLock();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论