stoty commented on a change in pull request #1146:
URL: https://github.com/apache/phoenix/pull/1146#discussion_r580004098
##########
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:
Agree on the placeholder, but I don't think addig the unconditional
trace log is a good idea.
We should not use one set of conditions for INFO, and another for TRACE, and
should not double log, as both conflicts with the usual/expected logging
semantics.
----------------------------------------------------------------
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]