Copilot commented on code in PR #8824:
URL: https://github.com/apache/hbase/pull/8824#discussion_r4418433309
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java:
##########
@@ -511,16 +520,26 @@ public String toString() {
@Override
public void onConfigurationChange(Configuration conf) {
- cacheDataOnRead = conf.getBoolean(CACHE_DATA_ON_READ_KEY,
DEFAULT_CACHE_DATA_ON_READ);
- cacheDataOnWrite = conf.getBoolean(CACHE_BLOCKS_ON_WRITE_KEY,
DEFAULT_CACHE_DATA_ON_WRITE);
- evictOnClose = conf.getBoolean(EVICT_BLOCKS_ON_CLOSE_KEY,
DEFAULT_EVICT_ON_CLOSE);
+ updateCacheSettings(conf);
LOG.info(
"Config hbase.block.data.cacheonread is changed to {}, "
+ "hbase.rs.cacheblocksonwrite is changed to {}, "
+ "hbase.rs.evictblocksonclose is changed to {}",
cacheDataOnRead, cacheDataOnWrite, evictOnClose);
Review Comment:
This log message claims the *config values* for the three keys changed, but
after this PR the logged fields are *effective* values that may be forced to
false or OR’ed with column-family settings (via `updateCacheSettings`). This
can mislead operators when a global config is set to true but a CF disables
block cache (or vice versa). Suggest updating the message to indicate these are
effective CacheConfig flags, or log both the raw `conf.getBoolean(...)` values
and the effective values separately.
--
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]