zhengm-h commented on issue #10708:
URL: https://github.com/apache/rocketmq/issues/10708#issuecomment-5139881075

   > **Issue Evaluation**
   > 
   > Category: `type/bug` | Status: **Confirmed**
   > 
   > The reported issue has been verified against the current codebase.
   > 
   > **Root Cause:** When running with `--enable-proxy` (local/embedded mode), 
the `mqbroker` startup script embeds a full `BrokerController` inside the Proxy 
process. The `broker.conf` values are loaded into the standalone broker's 
config objects, but the embedded broker's `MessageStoreConfig` instance is not 
fully initialized from `broker.conf` — so `fileReservedTime` remains at its 
default value of `72`.
   > 
   > When `mqadmin getBrokerConfig` is executed, it hits 
`AdminBrokerProcessor.getBrokerConfig()` → 
`Configuration.getAllConfigsInternal()`, which re-merges the live config-object 
properties back into the cached `allConfigs` map. Since the embedded 
`MessageStoreConfig.fileReservedTime` is `72` at runtime, the merge overwrites 
the cached `168` from `broker.conf`, producing the log line:
   > 
   > ```
   > Replace, key: fileReservedTime, value: 168  -> 72
   > ```
   > 
   > **Impact:** The displayed config value diverges from what was configured. 
The actual file retention behavior depends on which config object the store 
layer reads at runtime — but the config drift itself is a correctness issue.
   > 
   > **Severity:** Medium — affects observability and may cause confusion; 
actual file retention depends on which config path the CommitLog deletion logic 
uses.
   > 
   > **Key files involved:**
   > 
   > * 
`broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java`
 (`getBrokerConfig` handler)
   > * `remoting/src/main/java/org/apache/rocketmq/remoting/Configuration.java` 
(`getAllConfigsInternal`, `merge`)
   > * `broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java` 
(embedded broker wiring)
   > * 
`store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java` 
(default `fileReservedTime = 72`)
   > 
   > **Note:** The Proxy module itself does not write or trigger config 
updates. The issue is in how the embedded `BrokerController` is initialized in 
`--enable-proxy` local mode.
   > 
   > An automated fix proposal can be generated if the community confirms the 
approach. Reply `/approve` to proceed with PR generation.
   > 
   > _Automated evaluation by RockteMQ-AI_
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to