fabriziofortino commented on code in PR #1522: URL: https://github.com/apache/jackrabbit-oak/pull/1522#discussion_r1637782270
########## oak-api/src/main/java/org/apache/jackrabbit/oak/api/jmx/IndexStatsMBean.java: ########## @@ -127,6 +128,15 @@ public interface IndexStatsMBean { */ String getReferenceCheckpoint(); + @Description("Force update the indexing lane to a latest checkpoint. This will abort and pause the running lane, release it's lease and set the reference checkpoint to a latest one." + Review Comment: typo ```suggestion @Description("Force update the indexing lane to a latest checkpoint. This will abort and pause the running lane, release its lease and set the reference checkpoint to a latest one." + ``` ########## oak-api/src/main/java/org/apache/jackrabbit/oak/api/jmx/IndexStatsMBean.java: ########## @@ -127,6 +128,15 @@ public interface IndexStatsMBean { */ String getReferenceCheckpoint(); + @Description("Force update the indexing lane to a latest checkpoint. This will abort and pause the running lane, release it's lease and set the reference checkpoint to a latest one." + + "Any content changes b/w the old reference checkpoint and the new one will be not be indexed and a reindexing would be required." + + "Only use this operation if you are sure that the lane is stuck and not updated since many days and cannot catchup on it's own." + Review Comment: typos ```suggestion "Only use this operation if you are sure that the lane is stuck and not updated for many days and cannot catch up on its own." + ``` ########## oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java: ########## @@ -1242,6 +1242,54 @@ 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 catchup 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 catchup on it's own."; Review Comment: typo ```suggestion String msg = "The lane is not failing. This operation should only be performed if the lane is failing, it should first be allowed to catchup on its own."; ``` ########## oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/AsyncIndexUpdate.java: ########## @@ -1242,6 +1242,54 @@ 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 catchup 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 catchup on it's own."; + log.warn(msg); + return msg; + } + + log.info("Running a forced catchup for indexing lane [{}]. ", name); Review Comment: removed extra space and `.` to make it consistent with other logs in the same function ```suggestion log.info("Running a forced catchup for indexing lane [{}]", name); ``` -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org