jackjlli commented on a change in pull request #3568: Add guava cache to cache
table schema in pinot broker
URL: https://github.com/apache/incubator-pinot/pull/3568#discussion_r255388826
##########
File path:
pinot-common/src/main/java/com/linkedin/pinot/common/utils/CommonConstants.java
##########
@@ -118,10 +118,15 @@ public ServerType getServerType() {
public static final String
CONFIG_OF_BROKER_REFRESH_TIMEBOUNDARY_INFO_SLEEP_INTERVAL =
"pinot.broker.refresh.timeBoundaryInfo.sleepInterval";
public static final long
DEFAULT_BROKER_REFRESH_TIMEBOUNDARY_INFO_SLEEP_INTERVAL_MS = 10000L;
+ public static final String CONFIG_OF_TABLE_SCHEMA_MAXIMUM_CACHE_SIZE =
"pinot.broker.table.schema.cache.size";
Review comment:
The design of using this guava cache is, if the schema doesn't exist, the
cache makes an async call to fetch the schema. This async call will be done
**only once** even if there's a burst of queries coming in (e.g N queries). The
following queries (from 2nd to Nth) containing the new table name will ignore
the schema check until guava cache successfully gets the schema from ZK. So in
this case, we guarantee the number of times to hit ZK is just once. There won't
be N ZK reads when N queries received.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]