ibessonov commented on code in PR #2838:
URL: https://github.com/apache/ignite-3/pull/2838#discussion_r1399166120
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/configuration/schema/PersistentPageMemoryDataRegionConfigurationSchema.java:
##########
@@ -28,8 +29,9 @@
*/
@Config
public class PersistentPageMemoryDataRegionConfigurationSchema extends
BasePageMemoryDataRegionConfigurationSchema {
- /** Default size. */
- public static final long DFLT_DATA_REGION_SIZE = 256 * MiB;
+ /** Default size, maximum between 256 MB and 20% of the total physical
memory. */
+ @SuppressWarnings("NumericCastThatLosesPrecision")
+ public static final long DFLT_DATA_REGION_SIZE = Math.max(256 * MiB,
(long) (0.2 * getTotalMemoryAvailable()));
Review Comment:
We use Math.max. If info is not available, size will bee 256MiB. This is not
fully reflected in the javadoc, I may fix that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]