RockteMQ-AI commented on issue #11037:
URL: https://github.com/apache/rocketmq/issues/11037#issuecomment-5551054716

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase on the 
`develop` branch.
   
   **Root Cause:** In `ScheduleMessageService#messageTimeUp`, 
`setPropertiesString()` is called **before** `clearProperty()` for 
`PROPERTY_DELAY_TIME_LEVEL`, `PROPERTY_TIMER_DELIVER_MS`, and 
`PROPERTY_TIMER_DELAY_SEC`. The `propertiesString` is what gets persisted into 
the commitlog and decoded by consumers, so the wire data still carries these 
internal properties even though the broker-side property map has been cleaned 
up.
   
   **Code Evidence (develop branch):**
   ```java
   // Line ~344 — encodes propertiesString BEFORE clearing
   
msgInner.setPropertiesString(MessageDecoder.messageProperties2String(msgExt.getProperties()));
   // ...
   // Lines ~353-355 — clears properties AFTER encoding (too late for 
propertiesString)
   MessageAccessor.clearProperty(msgInner, 
MessageConst.PROPERTY_DELAY_TIME_LEVEL);
   MessageAccessor.clearProperty(msgInner, 
MessageConst.PROPERTY_TIMER_DELIVER_MS);
   MessageAccessor.clearProperty(msgInner, 
MessageConst.PROPERTY_TIMER_DELAY_SEC);
   ```
   
   **Impact:** Consumers receive stale internal delay properties via 
`getProperties()` / `getProperty("DELAY_TIME_LEVEL")`. SQL92 property filtering 
on these properties will see incorrect values. The property map and wire data 
are inconsistent.
   
   **Severity:** Medium — data correctness issue for delay message consumers; 
does not cause message loss or broker crash.
   
   **Fix:** Move `setPropertiesString()` to **after** the `clearProperty()` 
calls, consistent with the timer-wheel fix in commit e533b663f (#10972).
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*
   


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