asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject asterixdb git commit: Fix Large Page Budget Check
Date Thu, 23 Mar 2017 23:43:03 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7d554fcb2 -> 4a290fe19


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 <buyingyi@gmail.com>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/4a290fe1
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/4a290fe1
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/4a290fe1

Branch: refs/heads/master
Commit: 4a290fe19b45b803c820c30412831c5033a62abe
Parents: 7d554fc
Author: Michael Blow <mblow@apache.org>
Authored: Thu Mar 23 13:08:05 2017 -0700
Committer: Michael Blow <mblow@apache.org>
Committed: Thu Mar 23 16:42:46 2017 -0700

----------------------------------------------------------------------
 .../storage/common/buffercache/ClockPageReplacementStrategy.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/4a290fe1/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/ClockPageReplacementStrategy.java
----------------------------------------------------------------------
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 @@ public class ClockPageReplacementStrategy implements IPageReplacementStrategy
{
     }
 
     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();


Mime
View raw message