Liu-ZhenYu opened a new issue, #10086:
URL: https://github.com/apache/rocketmq/issues/10086

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [x] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [x] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   linux
   
   ### RocketMQ version
   
   develop
   
   ### JDK Version
   
   java11
   
   ### Describe the Bug
   
   In AdminBrokerProcessor.switchTimerEngine() method, Switching to the RocksDB 
timer engine persists **timerUseRocksDB** instead of **timerRocksDBEnable**, so 
the change isn’t durable and may revert after restart. The error message also 
has a typo (“muse”) and references the wrong key.
   
   `
   if (this.brokerController.getTimerMessageRocksDBStore() == null) {
       response.setCode(ResponseCode.INVALID_PARAMETER);
       response.setRemark("timerUseRocksDB muse be configured true when broker 
start");
       return response;
   }
   result = this.brokerController.getTimerMessageRocksDBStore().restart();
   if (result) {
       properties.put("timerStopEnqueue", Boolean.TRUE.toString());
       properties.put("timerUseRocksDB", Boolean.TRUE.toString());
       properties.put("timerRocksDBStopScan", Boolean.FALSE.toString());
   }
   `
   
   
   ### Steps to Reproduce
   
   1. Start broker with timerRocksDBEnable=true.
   2. Run mqadmin switchTimerEngine to switch to RocksDB 
(TIMER_ENGINE_ROCKSDB_TIMELINE).
   3. Check broker config file or printed config.
   4. Restart broker and verify the engine selection.
   
   ### What Did You Expect to See?
   
   After switching to RocksDB, the broker config should persist 
`timerRocksDBEnable=true`, and the error message should reference the correct 
key.
   
   ### What Did You See Instead?
   
   The config persisted `timerUseRocksDB=true`, and the error message 
referenced the wrong key with a typo (“muse”). After restart, the engine may 
fall back to non‑RocksDB.
   
   ### Additional Context
   
   _No response_


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