fuyou001 commented on PR #10519:
URL: https://github.com/apache/rocketmq/pull/10519#issuecomment-4741426672

   **[P1] Do not fall back to single requests after an ambiguous batch failure**
   
   `processBrokerChangeInvisibleTime` falls back to individual 
`changeInvisibleTime` calls for every exception from 
`batchChangeInvisibleTime`, including timeouts, connection resets, and lost 
responses. Those failures do not prove that the broker did not apply the batch. 
The broker may have already persisted the new CK records and only the response 
failed to reach the proxy.
   
   Retrying each entry with the original receipt handle is not idempotent: each 
execution generates a new `changedPopTime`, so the fallback can create a second 
CK while the CK created by the successful batch remains. Both CKs may later 
revive the same message, causing duplicate delivery.
   
   Please restrict fallback to an explicit response proving that the broker 
does not support the batch request code. Transport failures and timeouts should 
not be retried this way unless the operation is made idempotent, for example 
with a request identifier deduplicated by the broker. A regression test should 
cover the case where the broker applies the batch but the client future 
completes with a timeout.


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