Taewoo Kim has submitted this change and it was merged. 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 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2517 Reviewed-by: Luo Chen <[email protected]> Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: abdullah alamoudi <[email protected]> --- 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, 5 insertions(+), 3 deletions(-) Approvals: Luo Chen: Looks good to me, approved Anon. E. Moose #1000171: abdullah alamoudi: Looks good to me, approved Jenkins: Verified; No violations found; ; Verified 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..7f3d12f 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,11 @@ // 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, + buffers.get(currentBufferIdx).capacity()); + buffers.get(currentBufferIdx).position(buffers.get(currentBufferIdx).capacity()); 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: merged Gerrit-Change-Id: I0d6e7e7188efe1f08016af0ab1840bc0cb59d49c Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Taewoo Kim <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Luo Chen <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]>
