>From Michael Blow <[email protected]>:

Attention is currently required from: Ali Alsuliman, Ian Maxon, Murtadha 
Hubail, Ritik Raj.

Michael Blow has posted comments on this change by Michael Blow. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21627?usp=email )

Change subject: [ASTERIXDB-3940][STO] Reclaim idle memory components when vbc 
is full
......................................................................


Patch Set 2:

(3 comments)

Patch set 3 rebases onto current totoro and re-scopes the change. 
ASTERIXDB-3824 has since removed the larger source of idle components (eagerly 
allocated siblings), so this is now a safety net for the path that remains: an 
index that is read, or has a flush scheduled, but is never written still 
allocates its current memory component and never activates it. Filed as 
ASTERIXDB-3940.

Commit Message:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21627/comment/3800fd5c_362b2cef?usp=email
 :
PS2, Line 7: [NO ISSUE][STO] Reclaim idle memory components when the vbc is full
> this seems like a substantial enough change to merit an issue, because it is 
> changing longstanding c […]
Agreed. Filed ASTERIXDB-3940.


https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21627/comment/0b66bc10_5f135987?usp=email
 :
PS2, Line 46: Change-Id: I4cccd9857d277b1a32017f0afcbd644e33388f2f
> should be the last line shouldn't it? though i guess it worked
Done. Change-Id is last now, and the trailers are Generated-by.


File 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/GlobalVirtualBufferCache.java:

https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21627/comment/b4f73771_7bbc169d?usp=email
 :
PS2, Line 519:          * {@link #selectFlushIndex()} will never select, 
because it only selects components which are not empty.
> if this is the specific situation this method fixes, why not instead make it 
> so that selectFlushInde […]
I looked at that, but it doesn't work. selectFlushIndex()'s caller adds the 
selected index to flushingIndexes, and only flushed() takes it out again. 
PrimaryIndexOperationTracker.flushIfRequested() skips the flush of an empty 
primary index ("... is empty... skipping flush"), so flushed() never runs for 
it. Each empty index selected that way would hold one of the 
maxConcurrentFlushes slots permanently, and enough of them would stop real 
flushes too. Giving back an empty component's pages isn't a flush, so it needs 
its own path. I've put this in the javadoc as well.

The simpler fix at the source would be to not allocate memory components on 
paths that can't write to them (enter() for a search, scheduleFlush() on an 
index that was never written). I've noted that on ASTERIXDB-3940 as a 
longer-term alternative. It touches every isMemoryComponentsAllocated() call 
site in LSMHarness, so I've kept it out of this change.



--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21627?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: asterixdb
Gerrit-Branch: totoro
Gerrit-Change-Id: I4cccd9857d277b1a32017f0afcbd644e33388f2f
Gerrit-Change-Number: 21627
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Ali Alsuliman <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Ritik Raj <[email protected]>
Gerrit-Attention: Murtadha Hubail <[email protected]>
Gerrit-Attention: Ian Maxon <[email protected]>
Gerrit-Attention: Ali Alsuliman <[email protected]>
Gerrit-Attention: Ritik Raj <[email protected]>
Gerrit-Comment-Date: Sat, 03 Oct 2026 16:59:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ian Maxon <[email protected]>

Reply via email to