asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject asterixdb git commit: Fix overflow for dynamic parameter setting
Date Sun, 15 Jan 2017 05:06:53 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 43b40b68a -> 66fbbd176


Fix overflow for dynamic parameter setting

If your memory was large enough (~16gb did it for me), the
calculation for the memory component size could overflow.

Change-Id: I69d5e3f80916fc8525a0267abb4ca8ddabb73649
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1438
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/66fbbd17
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/66fbbd17
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/66fbbd17

Branch: refs/heads/master
Commit: 66fbbd1762aa36071313574cf53a7ca64a195cb7
Parents: 43b40b6
Author: Ian Maxon <imaxon@apache.org>
Authored: Sat Jan 14 18:21:39 2017 -0800
Committer: Ian Maxon <imaxon@apache.org>
Committed: Sat Jan 14 21:06:19 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/asterix/common/config/StorageProperties.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/66fbbd17/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
index fbaf0a7..faacc64 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
@@ -66,8 +66,8 @@ public class StorageProperties extends AbstractProperties {
         storageMemorycomponentGlobalbudgetDefault = maxHeapSize / 4;
         // By default, uses 1/16 of the storageMemorycomponentGlobalbudgetDefault for the
write buffer budget
         // for a dataset, including data and indexes.
-        storageMemoryComponentNumPages = (int) storageMemorycomponentGlobalbudgetDefault
-                / (16 * getMemoryComponentPageSize());
+        storageMemoryComponentNumPages = (int) (storageMemorycomponentGlobalbudgetDefault
+                / (16 * getMemoryComponentPageSize()));
     }
 
     @PropertyKey(STORAGE_BUFFERCACHE_PAGESIZE_KEY)


Mime
View raw message