提交 e28316ac authored 作者: Thomas Mueller's avatar Thomas Mueller

Bugfig

上级 96aa7058
......@@ -117,7 +117,6 @@ public class MVSecondaryIndex extends BaseIndex {
if (map.isSameTransaction(k)) {
continue;
}
map.remove(array);
if (map.get(k) != null) {
// committed
throw getDuplicateKeyException(k.toString());
......
......@@ -595,7 +595,6 @@ public class TransactionStore {
* @return the savepoint id
*/
public long setSavepoint() {
checkNotClosed();
return logId;
}
......@@ -1063,7 +1062,10 @@ public class TransactionStore {
}
VersionedValue getValue(K key, long maxLog, VersionedValue data) {
for (int i = 0; i < 10; i++) {
;
// TODO test case for many updates within the same transaction
// TODO detect loops
for (int i = 0; i < 1000; i++) {
int tx;
if (data == null) {
// doesn't exist or deleted by a committed transaction
......
......@@ -461,6 +461,8 @@ public abstract class Table extends SchemaObjectBase {
} catch (DbException e) {
if (e.getErrorCode() == ErrorCode.CONCURRENT_UPDATE_1) {
session.rollbackTo(rollback, false);
session.startStatementWithinTransaction();
rollback = session.setSavepoint();
}
throw e;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论