lizhimins commented on code in PR #9256:
URL: https://github.com/apache/rocketmq/pull/9256#discussion_r2046551423


##########
store/src/main/java/org/apache/rocketmq/store/CommitLog.java:
##########
@@ -850,41 +847,23 @@ private boolean isMappedFileMatchedRecover(final 
MappedFile mappedFile) throws R
             return false;
         }
 
-        if 
(this.defaultMessageStore.getMessageStoreConfig().isEnableRocksDBStore()) {
-            final long maxPhyOffsetInConsumeQueue = 
this.defaultMessageStore.getQueueStore().getMaxPhyOffsetInConsumeQueue();
-            long phyOffset = 
byteBuffer.getLong(MessageDecoder.MESSAGE_PHYSIC_OFFSET_POSITION);
-            if (phyOffset <= maxPhyOffsetInConsumeQueue) {
-                log.info("find check. beginPhyOffset: {}, 
maxPhyOffsetInConsumeQueue: {}", phyOffset, maxPhyOffsetInConsumeQueue);
-                return true;
-            }
-        } else {
-            int sysFlag = byteBuffer.getInt(MessageDecoder.SYSFLAG_POSITION);
-            int bornHostLength = (sysFlag & MessageSysFlag.BORNHOST_V6_FLAG) 
== 0 ? 8 : 20;
-            int msgStoreTimePos = 4 + 4 + 4 + 4 + 4 + 8 + 8 + 4 + 8 + 
bornHostLength;
-            long storeTimestamp = byteBuffer.getLong(msgStoreTimePos);
-            if (0 == storeTimestamp) {
-                return false;
-            }
+        int sysFlag = byteBuffer.getInt(MessageDecoder.SYSFLAG_POSITION);
+        int bornHostLength = (sysFlag & MessageSysFlag.BORNHOST_V6_FLAG) == 0 
? 8 : 20;
+        int msgStoreTimePos = 4 + 4 + 4 + 4 + 4 + 8 + 8 + 4 + 8 + 
bornHostLength;
+        long storeTimestamp = byteBuffer.getLong(msgStoreTimePos);
+        if (0 == storeTimestamp) {
+            return false;
+        }
 
-            if 
(this.defaultMessageStore.getMessageStoreConfig().isMessageIndexEnable()
-                && 
this.defaultMessageStore.getMessageStoreConfig().isMessageIndexSafe()) {
-                if (storeTimestamp <= 
this.defaultMessageStore.getStoreCheckpoint().getMinTimestampIndex()) {
-                    log.info("find check timestamp, {} {}",
-                        storeTimestamp,
-                        UtilAll.timeMillisToHumanString(storeTimestamp));
-                    return true;
-                }
-            } else {
-                if (storeTimestamp <= 
this.defaultMessageStore.getStoreCheckpoint().getMinTimestamp()) {
-                    log.info("find check timestamp, {} {}",
-                        storeTimestamp,
-                        UtilAll.timeMillisToHumanString(storeTimestamp));
-                    return true;
-                }
-            }
+        if 
(this.defaultMessageStore.getMessageStoreConfig().isMessageIndexEnable()
+            && 
this.defaultMessageStore.getMessageStoreConfig().isMessageIndexSafe()

Review Comment:
   一般用行尾 && 可以让条件对齐



-- 
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: commits-unsubscr...@rocketmq.apache.org

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

Reply via email to