rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

unexpected behavior/errors when changing storePathCommitLog directory

Open xhkyyy opened this issue 7 years ago • 3 comments

  • 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

  1. Please tell us about your environment:

    Java: 1.8 RocketMQ: 4.3.2

  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 avatar May 25 '19 14:05 xhkyyy

@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 avatar Aug 08 '19 01:08 duhenglucky

@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 avatar Aug 12 '19 04:08 xhkyyy

@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.

duhenglucky avatar Mar 12 '20 08:03 duhenglucky