You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2025/12/21 17:58:29 UTC
[XS] Change in asterixdb[phoenix]: [NO ISSUE][*DB][STO] Fix IndexOutOfBoundsException when flushPtr is 0
From Michael Blow <mb...@apache.org>:
Hello Jenkins,
I'd like you to do a code review.
Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20723?usp=email
to review the following change.
Change subject: [NO ISSUE][*DB][STO] Fix IndexOutOfBoundsException when flushPtr is 0
......................................................................
[NO ISSUE][*DB][STO] Fix IndexOutOfBoundsException when flushPtr is 0
- user model changes: no
- storage format changes: no
- interface changes: no
Ext-ref: MB-69772
Change-Id: I8a3761d0ab3759694af51f77bf8bfa9cbbcb8d1d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20652
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/23/20723/1
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java
index 2c925fd..aa636c8 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java
@@ -149,7 +149,7 @@
}
if (primaryIndexes.isEmpty()) {
flushPtr = 0;
- } else if (flushPtr >= pos) {
+ } else if (flushPtr >= pos && flushPtr > 0) {
// If the removed index is before flushPtr, we should decrement flushPtr by 1 so that
// it still points to the same index.
flushPtr = (flushPtr - 1) % primaryIndexes.size();
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20723?usp=email
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: phoenix
Gerrit-Change-Id: I8a3761d0ab3759694af51f77bf8bfa9cbbcb8d1d
Gerrit-Change-Number: 20723
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-CC: Peeyush Gupta <pe...@couchbase.com>