Michael Blow has submitted this change and it was merged.

Change subject: Fix Large Page Budget Check
......................................................................


Fix Large Page Budget Check

The logic for ensuring for large page budget is off by one; fix the
comparison.

Avoids silly log messages like the following:

Exceeding buffer cache budget of 1674 by 0 pages in order to satisfy
large page read


Change-Id: I047d52f53ae26febc8e8f0a54de557409276eb91
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1611
Reviewed-by: Yingyi Bu <[email protected]>
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
BAD: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yingyi Bu: Looks good to me, approved
  Jenkins: Verified; No violations found; No violations found; Verified



diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
index c12f288..872ac35 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
@@ -209,7 +209,7 @@
     }
 
     private void ensureBudgetForLargePages(int delta) {
-        while (numPages.get() + delta >= maxAllowedNumPages) {
+        while (numPages.get() + delta > maxAllowedNumPages) {
             ICachedPageInternal victim = findVictimByEviction();
             if (victim != null) {
                 final int victimMultiplier = victim.getFrameSizeMultiplier();

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1611
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I047d52f53ae26febc8e8f0a54de557409276eb91
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>

Reply via email to