You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/08/18 06:09:30 UTC

[GitHub] [rocketmq] drgnchan commented on a change in pull request #3256: [ISSUE #3257] Ignore irrelevant commit log files on startup

drgnchan commented on a change in pull request #3256:
URL: https://github.com/apache/rocketmq/pull/3256#discussion_r690928372



##########
File path: store/src/main/java/org/apache/rocketmq/store/MappedFileQueue.java
##########
@@ -34,6 +37,7 @@
     private static final InternalLogger LOG_ERROR = InternalLoggerFactory.getLogger(LoggerName.STORE_ERROR_LOGGER_NAME);
 
     private static final int DELETE_FILES_BATCH_MAX = 10;
+    private static final Pattern MAPPED_FILENAME_PATTERN = Pattern.compile("^\\d{20}$");

Review comment:
       In my opinion,the number '20' which in pattern 'MAPPED_FILENAME_PATTERN' and in `org.apache.rocketmq.common.UtilAll#offset2FileName`'s `nf.setMinimumIntegerDigits(20);` is a magic number.Maybe they can be replaced by a named constant.




-- 
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-unsubscribe@rocketmq.apache.org

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