You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/02/19 04:40:03 UTC

[GitHub] [phoenix] stoty commented on a change in pull request #1146: PHOENIX-6388 Add sampled logging for read repairs

stoty commented on a change in pull request #1146:
URL: https://github.com/apache/phoenix/pull/1146#discussion_r578921216



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java
##########
@@ -586,17 +595,30 @@ 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("Index row repair on region "
+                                + env.getRegionInfo().getRegionNameAsString() + " took "
+                                + repairTime + "ms");

Review comment:
       nit: use {} substitution for parameters ?




----------------------------------------------------------------
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:
users@infra.apache.org