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

Multi-threaded processing: concurrent deleting the same row could throw the…

Multi-threaded processing: concurrent deleting the same row could throw the exception Row not found when trying to delete
上级 548d128b
...@@ -21,6 +21,9 @@ Change Log ...@@ -21,6 +21,9 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>Multi-threaded processing: concurrent deleting the same row could throw the exception
"Row not found when trying to delete".
</li>
<li>MVStore transactions: a thread could see a change of a different thread <li>MVStore transactions: a thread could see a change of a different thread
within a different map. Pull request #153. within a different map. Pull request #153.
</li> </li>
......
...@@ -293,7 +293,9 @@ public abstract class Command implements CommandInterface { ...@@ -293,7 +293,9 @@ public abstract class Command implements CommandInterface {
} }
private long filterConcurrentUpdate(DbException e, long start) { private long filterConcurrentUpdate(DbException e, long start) {
if (e.getErrorCode() != ErrorCode.CONCURRENT_UPDATE_1) { int errorCode = e.getErrorCode();
if (errorCode != ErrorCode.CONCURRENT_UPDATE_1 &&
errorCode != ErrorCode.ROW_NOT_FOUND_WHEN_DELETING_1) {
throw e; throw e;
} }
long now = System.nanoTime() / 1000000; long now = System.nanoTime() / 1000000;
......
...@@ -234,7 +234,6 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -234,7 +234,6 @@ public class MVSecondaryIndex extends BaseIndex implements MVIndex {
} }
} }
@Override @Override
public void remove(Session session, Row row) { public void remove(Session session, Row row) {
ValueArray array = convertToKey(row); ValueArray array = convertToKey(row);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论