amit-jain commented on code in PR #715:
URL: https://github.com/apache/jackrabbit-oak/pull/715#discussion_r996908837


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/progress/IndexingProgressReporter.java:
##########
@@ -229,10 +231,12 @@ public IndexUpdateState(String indexPath, boolean 
reindex, long estimatedCount)
         }
 
         public void indexUpdate() throws CommitFailedException {
-            updateCount++;
-            if (updateCount % 10000 == 0) {
-                log.info("{} => Indexed {} nodes in {} ...", indexPath, 
updateCount, watch);
-                watch.reset().start();
+            long count = updateCount.incrementAndGet();
+            if (count % 10000 == 0) {
+                synchronized (this) {

Review Comment:
   The Stopwatch class is not thread-safe so, potentially could result in 
instability otherwise



-- 
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]

Reply via email to