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

setBrokerConfigPath not invoked correctly in BrokerStartup,which will persist brokerconfig to wrong location #6092

Closed
leizhiyuan opened this issue Feb 16, 2023 · 0 comments · Fixed by #6093

Comments

@leizhiyuan
Copy link
Contributor

The issue tracker is used for bug reporting purposes ONLY whereas feature request needs to follow the RIP process. To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.

It is recommended to start a discussion thread in the mailing lists in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues.
We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.

Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.

Generally, fixing an issue goes through the following steps:

  1. Understand the issue reported;
  2. Reproduce the unexpected behavior locally;
  3. Perform root cause analysis to identify the underlying problem;
  4. Create test cases to cover the identified problem;
  5. Work out a solution to rectify the behavior and make the newly created test cases pass;
  6. Make a pull request and go through peer review;

As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:

BUG REPORT

  1. Please describe the issue you observed:
  • What did you do (The steps to reproduce)?

update dynamicConfig ,then you will see the content was written to wrong location

method=org.apache.rocketmq.remoting.Configuration.getStorePath location=AtExit
ts=2023-02-16 12:07:57; [cost=0.091503ms] result=@ArrayList[
    @Object[][isEmpty=true;size=0],
    @String[conf/xxx_yyy_0.properties],
    null,
]
  • What is expected to see?

conf/broker.conf

  • What did you see instead?
  1. Please tell us about your environment:
String brokerConfigPath;
        if (brokerConfig.getBrokerConfigPath() != null && !brokerConfig.getBrokerConfigPath().isEmpty()) {
            brokerConfigPath = brokerConfig.getBrokerConfigPath();
        } else {
            brokerConfigPath = FilenameUtils.concat(
                FilenameUtils.getFullPathNoEndSeparator(BrokerPathConfigHelper.getBrokerConfigPath()),
                this.brokerConfig.getCanonicalName() + ".properties");
        }
        this.configuration = new Configuration(
            LOG,
            brokerConfigPath,
            this.brokerConfig, this.nettyServerConfig, this.nettyClientConfig, this.messageStoreConfig
        );

  1. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):

FEATURE REQUEST

  1. Please describe the feature you are requesting.

  2. Provide any additional detail on your proposed use case for this feature.

  3. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

  4. If there are some sub-tasks involved, use -[] for each sub-task and create a corresponding issue to map to the sub-task:

@leizhiyuan leizhiyuan changed the title setBrokerConfigPath not invoked in BrokerStartup,which will persist brokerconfig to wrong location setBrokerConfigPath not invoked correctly in BrokerStartup,which will persist brokerconfig to wrong location Feb 16, 2023
RongtongJin added a commit that referenced this issue Feb 21, 2023
mxsm pushed a commit to mxsm/rocketmq that referenced this issue Feb 23, 2023
redlsz pushed a commit to redlsz/rocketmq that referenced this issue May 25, 2023
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.

3 participants