Taewoo Kim has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/2517
Change subject: [ASTERIXDB-2338][RT] Allow concurrent accesses to an inverted
list
......................................................................
[ASTERIXDB-2338][RT] Allow concurrent accesses to an inverted list
- user model changes: no
- storage format changes: no
- interface changes: no
Details: Fix a bug that when a page of an inverted list
that is pinned to the buffer cache is accessed concurrently.
Change-Id: I0d6e7e7188efe1f08016af0ab1840bc0cb59d49c
---
M
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListCursor.java
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/17/2517/1
diff --git
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListCursor.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListCursor.java
index da3f079..dffa8c2 100644
---
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListCursor.java
+++
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListCursor.java
@@ -220,9 +220,10 @@
// Assumption: processing inverted list takes time; so, we don't
want to keep them on the buffer cache.
// Rather, we utilize the assigned working memory (buffers).
tmpBuffer = page.getBuffer();
- tmpBuffer.rewind();
- buffers.get(currentBufferIdx).rewind();
- buffers.get(currentBufferIdx).put(tmpBuffer);
+
+ // Copies the entire content of the page to the current buffer in
the working memory.
+ System.arraycopy(tmpBuffer.array(), 0,
buffers.get(currentBufferIdx).array(), 0, tmpBuffer.limit());
+ buffers.get(currentBufferIdx).position(tmpBuffer.limit());
currentBufferIdx++;
bufferCache.unpin(page);
--
To view, visit https://asterix-gerrit.ics.uci.edu/2517
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d6e7e7188efe1f08016af0ab1840bc0cb59d49c
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Taewoo Kim <[email protected]>