sunxiaojian commented on code in PR #8452:
URL: https://github.com/apache/gravitino/pull/8452#discussion_r2335381137
##########
core/src/main/java/org/apache/gravitino/Configs.java:
##########
@@ -408,6 +408,15 @@ private Configs() {}
.checkValue(StringUtils::isNotBlank,
ConfigConstants.NOT_BLANK_ERROR_MSG)
.createWithDefault("caffeine");
+ // Number of lock segments for cache concurrency optimization
+ public static final ConfigEntry<Integer> CACHE_LOCK_SEGMENTS =
+ new ConfigBuilder("gravitino.cache.lockSegments")
+ .doc("Number of lock segments for cache concurrency optimization.")
+ .version(ConfigConstants.VERSION_1_0_0)
+ .intConf()
+ .checkValue(value -> value > 0, "Lock segments must be positive")
+ .createWithDefault(16);
Review Comment:
No, 16 is not specifically advised by Guava, I referenced the
`DEFAULT_CAPACITY` value of `ConcurrentHashMap`.
--
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]