commit | 2b0ebf5835983340b8c80160b00166186784a245 | [log] [tgz] |
---|---|---|
author | Peeyush Gupta <peeyush.gupta@couchbase.com> | Mon Jul 15 11:43:02 2024 -0700 |
committer | Peeyush Gupta <peeyush.gupta@couchbase.com> | Mon Jul 15 22:38:06 2024 +0000 |
tree | 03896f04b5f96e62498ea733c160434dd3f7f673 | |
parent | 8aeaac5d8d3497e988d69f75ec96087de2c5c202 [diff] |
[ASTERIXDB-3451][STO] Avoid unlocking twice when pin fails - user model changes: no - storage format changes: no - interface changes: no Ext-ref: MB-62713 Change-Id: I1abe2a7cfd24d19319c6606c76d479291e6638b4 Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18487 Reviewed-by: Murtadha Hubail <mhubail@apache.org> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/DiskBTree.java b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/DiskBTree.java index df4ed47..87b0032 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/DiskBTree.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-am-btree/src/main/java/org/apache/hyracks/storage/am/btree/impls/DiskBTree.java
@@ -124,9 +124,10 @@ while (!ctx.getInteriorFrame().isLeaf()) { // walk down the tree until we find the leaf childPageId = ctx.getInteriorFrame().getChildPageId(ctx.getPred()); + ICachedPage nextPage = + bufferCache.pin(BufferedFileHandle.getDiskPageId(getFileId(), childPageId), bcOpCtx); bufferCache.unpin(currentPage, bcOpCtx); - - currentPage = bufferCache.pin(BufferedFileHandle.getDiskPageId(getFileId(), childPageId), bcOpCtx); + currentPage = nextPage; ctx.getInteriorFrame().setPage(currentPage); }