stefan-egli commented on code in PR #1278: URL: https://github.com/apache/jackrabbit-oak/pull/1278#discussion_r1466386518
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/ClusterNodeInfo.java: ########## @@ -615,6 +650,18 @@ private static Map.Entry<ClusterNodeInfo, Long> createInstance(DocumentStore sto // if we get here the cluster node entry is inactive. if recovery // was needed, then it was successful + if (reuseAfterRecoveryMillis > 0) { + Long lastRecoveryTime = (Long) doc.get(RECOVERY_TIME_KEY); Review Comment: If the document doesn't contain a `"recoveryTime"` key or the value of that key is `null`, then this will result in `lastRecoveryTime` here being null. No NPE is thrown. The intent was: * `"recoveryTime"` is null (non existent) in legacy cases : in this case no delay should apply (hence it skips the block below) * `"recoveryTime"` is null (non existent) after a graceful shutdown : in this cases also no delay should apply * `"recoveryTime"` is set to an actual value at the end of a recovery : only in this case should the blow below be handled All of these cases should be handled by the null check in the next line, or am I missing something? -- 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