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 2023/08/10 23:49:59 UTC
Change in asterixdb[master]: WIP: Fix internal error with COPY statement
From Peeyush Gupta <pe...@couchbase.com>:
Peeyush Gupta has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17718 )
Change subject: WIP: Fix internal error with COPY statement
......................................................................
WIP: Fix internal error with COPY statement
Change-Id: I7b1750bc60381a45f1b799f5050b79550b22b552
---
M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/18/17718/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 0bb9bd5..b7d4b59 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
@@ -498,12 +498,13 @@
// note that this is different from flushing a filtered memory component
PrimaryIndexOperationTracker opTracker =
(PrimaryIndexOperationTracker) primaryIndex.getOperationTracker();
+ ILSMMemoryComponent memoryComponent = null;
synchronized (opTracker) {
boolean flushable = !primaryIndex.isCurrentMutableComponentEmpty();
if (flushable && !opTracker.isFlushLogCreated()) {
// if the flush log has already been created, then we can simply wait for
// that flush to complete
- ILSMMemoryComponent memoryComponent = primaryIndex.getCurrentMemoryComponent();
+ memoryComponent = primaryIndex.getCurrentMemoryComponent();
if (memoryComponent.getState() == ComponentState.READABLE_WRITABLE) {
// before we schedule the flush, mark the memory component as unwritable to prevent
// future writers
@@ -522,7 +523,7 @@
if ((flushable || opTracker.isFlushLogCreated()) && !isMetadataIndex(primaryIndex)) {
// global vbc cannot wait on metadata indexes because metadata indexes support full
// ACID transactions. Waiting on metadata indexes can introduce deadlocks.
- flushingComponents.add(primaryIndex.getCurrentMemoryComponent());
+ flushingComponents.add(memoryComponent);
return primaryIndex;
}
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17718
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I7b1750bc60381a45f1b799f5050b79550b22b552
Gerrit-Change-Number: 17718
Gerrit-PatchSet: 1
Gerrit-Owner: Peeyush Gupta <pe...@couchbase.com>
Gerrit-MessageType: newchange