virajjasani commented on a change in pull request #1146:
URL: https://github.com/apache/phoenix/pull/1146#discussion_r580016719
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java
##########
@@ -586,17 +595,28 @@ private boolean verifyRowAndRepairIfNecessary(List<Cell>
cellList) throws IOExce
long ts = cellList.get(0).getTimestamp();
cellList.clear();
+ long repairTime;
try {
repairIndexRows(rowKey, ts, cellList);
+ repairTime = EnvironmentEdgeManager.currentTimeMillis() -
repairStart;
metricsSource.incrementIndexRepairs(indexName);
metricsSource.updateUnverifiedIndexRowAge(indexName,
EnvironmentEdgeManager.currentTimeMillis() - ts);
metricsSource.updateIndexRepairTime(indexName,
EnvironmentEdgeManager.currentTimeMillis() -
repairStart);
+ if (shouldLog()) {
+ LOG.info(String.format("Index row repair on region %s
took %d ms.",
+ env.getRegionInfo().getRegionNameAsString(),
repairTime));
+ }
Review comment:
I was just thinking if a user enables TRACE logging, this is a good log
candidate for all read repairs (it might be overwhelming too but that's why
unconditional TRACE might be more suitable) and whereas % based logs at INFO
level won't make it overwhelming which is the purpose of this PR anyways.
Thoughts?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]