Taewoo Kim has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2444

Change subject: [NO ISSUE][RT] no latching on an inverted list during merge
......................................................................

[NO ISSUE][RT] no latching on an inverted list during merge

- user-model changes: no
- storage format changes: no
- interface changes: no

Details:
- Do not conduct a latching on an inverted list during
  a disk component merge of an inverted index since
  a disk component is immutable.

Change-Id: I266135596bbd5158d5fcf5ce3d1735d407be6f0f
---
M 
hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListScanCursor.java
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/44/2444/1

diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListScanCursor.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListScanCursor.java
index ca0f40b..1792275 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListScanCursor.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-invertedindex/src/main/java/org/apache/hyracks/storage/am/lsm/invertedindex/ondisk/FixedSizeElementInvertedListScanCursor.java
@@ -30,7 +30,7 @@
 import org.apache.hyracks.storage.common.file.BufferedFileHandle;
 
 /**
- * A simple scan cursor that only reads a frame by frame from the inverted 
list. This cursor does not
+ * A simple scan cursor that only reads a frame by frame from the inverted 
list on disk. This cursor does not
  * conduct a binary search. It only supports the scan operation. The main 
purpose of this cursor is
  * doing a full-scan of an inverted list during a storage-component-merge 
process.
  */
@@ -105,20 +105,19 @@
     public void loadPages() throws HyracksDataException {
         if (pinned) {
             unloadPages();
+            pinned = false;
         }
         if (currentPageId == endPageId) {
             return;
         }
         currentPageId++;
         page = bufferCache.pin(BufferedFileHandle.getDiskPageId(fileId, 
currentPageId), false);
-        page.acquireReadLatch();
         pinned = true;
     }
 
     @Override
     public void unloadPages() throws HyracksDataException {
         if (pinned) {
-            page.releaseReadLatch();
             bufferCache.unpin(page);
             pinned = false;
         }
@@ -162,6 +161,7 @@
     public void doClose() throws HyracksDataException {
         if (pinned) {
             unloadPages();
+            pinned = false;
         }
     }
 
@@ -169,6 +169,7 @@
     public void doDestroy() throws HyracksDataException {
         if (pinned) {
             unloadPages();
+            pinned = false;
         }
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2444
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I266135596bbd5158d5fcf5ce3d1735d407be6f0f
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Taewoo Kim <[email protected]>

Reply via email to