aaron-ai commented on code in PR #4825: URL: https://github.com/apache/rocketmq/pull/4825#discussion_r955713918
########## broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOrderInfoManager.java: ########## @@ -266,6 +266,15 @@ public String configFilePath() { } } + @Override + public String configFileBakPath() { + if (brokerController != null) { + return BrokerPathConfigHelper.getConsumerOrderInfoBakPath(this.brokerController.getMessageStoreConfig().getStorePathRootDir()); + } else { + return BrokerPathConfigHelper.getConsumerOrderInfoBakPath("~"); Review Comment: ditto ########## broker/src/main/java/org/apache/rocketmq/broker/filter/ConsumerFilterManager.java: ########## @@ -226,6 +226,16 @@ public String configFilePath() { return BrokerPathConfigHelper.getConsumerFilterPath("./unit_test"); } + @Override + public String configFileBakPath() { + if (this.brokerController != null) { + return BrokerPathConfigHelper.getConsumerFilterBakPath( + this.brokerController.getMessageStoreConfig().getStorePathRootDir() + ); + } + return BrokerPathConfigHelper.getConsumerFilterBakPath("./unit_test"); Review Comment: is "./unit_test" here compatible with windows platform? ########## broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java: ########## @@ -67,6 +71,65 @@ public void testBrokerRestart() throws Exception { brokerController.shutdown(); } + @Test + public void testMultiPathStart() throws Exception { + MessageStoreConfig messageStoreConfig = new MessageStoreConfig(); + messageStoreConfig.setStorePathRootDir( + "target/unit_test_store/a/store" + MixAll.MULTI_PATH_SPLITTER Review Comment: ditto ########## broker/src/test/java/org/apache/rocketmq/broker/BrokerControllerTest.java: ########## @@ -67,6 +71,65 @@ public void testBrokerRestart() throws Exception { brokerController.shutdown(); } + @Test + public void testMultiPathStart() throws Exception { + MessageStoreConfig messageStoreConfig = new MessageStoreConfig(); + messageStoreConfig.setStorePathRootDir( + "target/unit_test_store/a/store" + MixAll.MULTI_PATH_SPLITTER + + "target/unit_test_store/b/store" + MixAll.MULTI_PATH_SPLITTER + + "target/unit_test_store/c/store" + ); + BrokerController brokerController = new BrokerController( + new BrokerConfig(), + new NettyServerConfig(), + new NettyClientConfig(), + messageStoreConfig); + assertThat(brokerController.initialize()).isTrue(); + brokerController.start(); + brokerController.shutdown(); + UtilAll.deleteFile(new File(new MessageStoreConfig().getStorePathRootDir())); + } + + @Test + public void testMultiPathLoadConfig() { + MessageStoreConfig messageStoreConfig = new MessageStoreConfig(); + messageStoreConfig.setStorePathRootDir( + "target/unit_test_store/a/store" + MixAll.MULTI_PATH_SPLITTER + + "target/unit_test_store/b/store" + MixAll.MULTI_PATH_SPLITTER Review Comment: ditto -- 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...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org