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

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase. This is a 
critical data integrity bug.
   
   **Root Cause:** In `CommitLog.asyncPutMessage`, when the initial append 
returns `END_OF_FILE` and the retry on a fresh file also fails (because the 
message exceeds `mappedFileSizeCommitLog`), the code unconditionally constructs 
`PutMessageResult` with `PutMessageStatus.PUT_OK` at line 1163. The retry's 
actual status is only used to decide whether to call `onCommitLogAppend`, but 
never propagates to the response.
   
   **Impact:** Silent data loss. The broker responds `ResponseCode.SUCCESS` to 
the producer via `SendMessageProcessor.handlePutMessageResult`, and the 
producer acknowledges the send as successful, but the message was never 
persisted to the commit log. The queue offset is also not advanced (guarded by 
`PUT_OK` check at lines 1146-1148), creating an inconsistency between the 
broker's response and actual state.
   
   **Severity:** **Critical** — affects data reliability guarantees, which is 
fundamental to a message queue system.
   
   **Affected Code Paths:**
   - `CommitLog.java:1114-1131, 1163` (single message path)
   - `CommitLog.java:1274-1287, 1320` (batch message path)
   
   **Proposed Fix:** The reporter has provided a detailed fix strategy: capture 
the retry's `AppendMessageResult`, check its status, and return 
`PutMessageStatus.UNKNOWN_ERROR` or a more specific error code when the retry 
fails, rather than unconditionally returning `PUT_OK`.
   
   An automated fix proposal will be generated based on the analysis. Reply 
`/approve` to proceed with PR generation, or provide feedback if adjustments 
are needed.
   
   ---
   *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