unexpected behavior/errors when changing storePathCommitLog directory
-
What did you do (The steps to reproduce)?
1) stop master broker 2) change ${storePathCommitLog} directory setting from '/home/rocketmq' to '/rocketmq' 3) mv /home/rocketmq/* /rocketmq/ 4) restart master broker
repeat the above steps for slave broker.
-
What did you see instead?
after restart I observed the following: 1) the Topic and Consumer offsets are no longer changing 2) stop async between master and slave broker
-
Please tell us about your environment:
Java: 1.8 RocketMQ: 4.3.2
-
Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
storeerror.log:
WARN WriteSocketService - Offset not matched. Request offset: 113756812151, firstOffset: 0, lastOffset: 60129542144, mappedFileSize: 1073741824, mappedFiles count: 56
@xhkyyy it seems that you just changed the storePathCommitLog, but moved all store message to this path, maybe you should change the storePathRootDir config.
@xhkyyy it seems that you just changed the storePathCommitLog, but moved all store message to this path, maybe you should change the storePathRootDir config.
@duhenglucky I am sure I've set the 'storePathRootDir'.
While reviewing the default value of 'storePathRootDir', I suddenly realized that the 'storePathRootDir' uses the 'store' directory as a subdirectory.
Here's the configuration I use:
storePathRootDir=/rocketmq
I mean, If I want to change the directory, I believe the correct configuration should be this:
storePathRootDir=/rocketmq/store
This is very subtle.
@xhkyyy rocketmq will create a new empty store directory in the subdirectory of your config as it's storage directory for safe, and It seems that developers in the community are also used to this usage, so I close this issue first, but please feel free to reopen it if you have any other questions.