Luo Chen has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/3003
Change subject: [ASTERIXDB-2467][STO] Fix locking protocol with bad tuples
......................................................................
[ASTERIXDB-2467][STO] Fix locking protocol with bad tuples
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- The current locking protocol is not correct when there are bad tuples,
e.g., duplicates. When locking fails, the write must push partial frames
so that the previous acquired locks are released. However, if there are
bad tuples in the frame, after bad tuples are removed from the frame, the
state of pushed partial frames will be completely lost.
Change-Id: I86baa1f21ef7390777c8e2b0ce226095528e7f18
---
M
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/LSMInsertDeleteOperatorNodePushable.java
1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/03/3003/1
diff --git
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/LSMInsertDeleteOperatorNodePushable.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/LSMInsertDeleteOperatorNodePushable.java
index 1401c0a..18dac60 100644
---
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/LSMInsertDeleteOperatorNodePushable.java
+++
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/LSMInsertDeleteOperatorNodePushable.java
@@ -109,10 +109,6 @@
@Override
public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
- currentTupleIdx = 0;
- lastFlushedTupleIdx = 0;
- flushedPartialTuples = false;
-
accessor.reset(buffer);
ILSMIndexAccessor lsmAccessor = (ILSMIndexAccessor) indexAccessor;
int tupleCount = accessor.getTupleCount();
@@ -164,6 +160,9 @@
FrameUtils.flushFrame(writeBuffer.getBuffer(), writer);
}
i = 0;
+ currentTupleIdx = 0;
+ lastFlushedTupleIdx = 0;
+ flushedPartialTuples = false;
}
/**
--
To view, visit https://asterix-gerrit.ics.uci.edu/3003
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I86baa1f21ef7390777c8e2b0ce226095528e7f18
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>