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 2022/08/26 06:51:08 UTC
[GitHub] [rocketmq] aaron-ai commented on a diff in pull request #4825: [ISSUE#4824] Support consumequeue, indexfile multiple directories storage mode
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org