This is an automated email from the ASF dual-hosted git repository.
peeyush pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 2b0ebf5835 [ASTERIXDB-3451][STO] Avoid unlocking twice when pin fails
2b0ebf5835 is described below
commit 2b0ebf5835983340b8c80160b00166186784a245
Author: Peeyush Gupta <[email protected]>
AuthorDate: Mon Jul 15 11:43:02 2024 -0700
[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 <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Tested-by: Murtadha Hubail <[email protected]>
---
.../java/org/apache/hyracks/storage/am/btree/impls/DiskBTree.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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 df4ed47979..87b003227f 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 @@ public class DiskBTree extends BTree {
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);
}