mbaedke commented on code in PR #2660:
URL: https://github.com/apache/jackrabbit-oak/pull/2660#discussion_r2664564169


##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexCopier.java:
##########
@@ -363,28 +366,31 @@ public boolean isCopyInProgress(LocalIndexFile file) {
      * @param timeoutMillis
      */
     public void waitForCopyCompletion(LocalIndexFile file, long timeoutMillis) 
{
-        final Monitor.Guard notCopyingGuard = new 
Monitor.Guard(copyCompletionMonitor) {
-            @Override
-            public boolean isSatisfied() {
-                return !isCopyInProgress(file);
-            }
-        };
         long localLength = file.actualSize();
         long lastLocalLength = localLength;
 
         boolean notCopying = !isCopyInProgress(file);
         while (!notCopying) {
+            final long deadline = System.nanoTime() + 
TimeUnit.MILLISECONDS.toNanos(timeoutMillis);
+            copyCompletionLock.lock();

Review Comment:
   How is that working with the timeout?



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