RockteMQ-AI commented on issue #11420: URL: https://github.com/apache/rocketmq/issues/11420#issuecomment-6146348359
**Fix Proposal — Spec v1** A fix spec has been generated for this issue. **Root Cause:** In `CommitLog.asyncPutMessage` (and `asyncPutMessages`), when the retry append after `END_OF_FILE` fails, the code unconditionally returns `PutMessageStatus.PUT_OK` at line 1163 instead of deriving the status from the actual retry result. **Fix Strategy:** 1. Add a helper method `toPutMessageStatus(AppendMessageStatus)` to map retry outcomes to `PutMessageStatus` 2. After the retry at line 1127, check the result status and return early with the appropriate error code if not `PUT_OK` 3. Apply the same fix to the batch path (`asyncPutMessages` at lines 1286-1287) 4. Remove the hardcoded `PUT_OK` at line 1163 and derive status from `result.getStatus()` **Affected Code:** - `CommitLog.java:1114-1163` (single message path) - `CommitLog.java:1274-1320` (batch message path) **Risk Assessment:** Low — no new enum values, no client-compatibility impact. The fix only corrects the error propagation path. **Test Plan:** Add unit tests covering: - Message size exceeds `mappedFileSizeCommitLog` → should return error, not `PUT_OK` - Retry append returns `MESSAGE_SIZE_EXCEEDED` → should propagate error - Batch append retry failure → should propagate error The full spec is available in the issue workspace. Reply `/approve` to proceed with PR generation, `/revise <feedback>` to request changes, or `/reject` to decline. --- *Automated fix proposal 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]
