fuyou001 commented on PR #10519: URL: https://github.com/apache/rocketmq/pull/10519#issuecomment-4738611033
**[P1] Preserve input ordering when returning batch change-invisible-time results** `batchChangeInvisibleTime` does not preserve the order of `handleMessageList`: expired-handle results are appended first, while the remaining results are appended later in `HashMap` group iteration order. However, `ReceiptHandleProcessor.batchChangeInvisibleTime` consumes the returned list by index and completes the future for `indexes.get(i)` with `results.get(i)`. When a renewal batch contains handles from different brokers/real topics, or contains an expired handle, a result can therefore be assigned to a different message. This may update message A with message B receipt handle and cause subsequent renew/ack operations to target the wrong offset. Please preserve the original input order in the returned result list, or correlate each result with its `ReceiptHandleMessage` instead of consuming results positionally. A regression test should cover interleaved broker/topic groups and an expired handle. -- 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]
