Ian Maxon has submitted this change and it was merged. Change subject: Fix overflow for dynamic parameter setting ......................................................................
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 <[email protected]> Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> BAD: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> --- M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Yingyi Bu: Looks good to me, approved Jenkins: Verified; No violations found; No violations found; Verified 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 @@ 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) -- To view, visit https://asterix-gerrit.ics.uci.edu/1438 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I69d5e3f80916fc8525a0267abb4ca8ddabb73649 Gerrit-PatchSet: 6 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Ian Maxon <[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]>
