nit0906 commented on code in PR #1522:
URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1643657775


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java:
##########
@@ -1242,6 +1242,62 @@ public String getReferenceCheckpoint() {
             return referenceCp;
         }
 
+        @Override
+        public String forceIndexLaneCatchup(String confirmMessage) throws 
CommitFailedException {
+
+            if (!"CONFIRM".equals(confirmMessage)) {
+                String msg = "Please confirm that you want to force the lane 
catch-up by passing 'CONFIRM' as argument";
+                log.warn(msg);
+                return msg;
+            }
+
+            if (!this.isFailing()) {
+                String msg = "The lane is not failing. This operation should 
only be performed if the lane is failing, it should first be allowed to catch 
up on its own.";
+                log.warn(msg);
+                return msg;
+            }
+
+            try {
+                log.info("Running a forced catch-up for indexing lane [{}]. ", 
name);
+                // First we need to abort and pause the running indexing task
+                this.abortAndPause();
+                log.info("Aborted and paused async indexing for lane [{}]", 
name);
+                // Release lease for the paused lane
+                this.releaseLeaseForPausedLane();
+                log.info("Released lease for paused lane [{}]", name);
+                String newReferenceCheckpoint = store.checkpoint(lifetime, 
Map.of(

Review Comment:
   done.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to