Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dir is created when using mult-dirs storage. #3900

Closed
cserwen opened this issue Feb 28, 2022 · 0 comments · Fixed by #3901
Closed

Wrong dir is created when using mult-dirs storage. #3900

cserwen opened this issue Feb 28, 2022 · 0 comments · Fixed by #3901

Comments

@cserwen
Copy link
Member

cserwen commented Feb 28, 2022

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?
    Test multi-disk storage RIP-7 Multiple Directories Storage Support #3357

  • What did you see?
    When I set storePathCommitLog as /home/work/ssd2/rocketmq/commitlog/,/home/work/ssd3/rocketmq/commitlog/,/home/work/ssd4/rocketmq/commitlog/, the broker will create this directory:/home/work/ssd2/rocketmq/commitlog/,/home/work/ssd3/rocketmq/commitlog/,/home/work/ssd4/rocketmq/commitlog/

[work@localhost ssd2]$ pwd
/home/work/ssd2/rocketmq/commitlog/,/home/work/ssd3/rocketmq/commitlog/,/home/work/ssd4/rocketmq/commitlog
  • What did you expect to see?
    This directory should not be created
  1. Please tell us about your environment:
    Branch:master
    OS:Linux

  2. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
    I find it will be created here:

    MappedFile.ensureDirOK(getStorePathPhysic());

    This method does not consider the multi-directory case:
    public static void ensureDirOK(final String dirName) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants