You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/10/16 03:06:50 UTC

[GitHub] [rocketmq] wqliang opened a new issue #1535: HA sync timeout is wrong when message length is larger than 160K

wqliang opened a new issue #1535: HA sync timeout is wrong when message length is larger than 160K
URL: https://github.com/apache/rocketmq/issues/1535
 
 
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   I deploy a cluster with a SYNC_MASTER and a Slave.
   Then I send a message larger than 160K.
   
   - What did you see instead?
    The master return "FLUSH_SLAVE_TIMEOUT" to producer and output log "transfer messsage to slave timeout".
   But actually, the message is transfer success.
   
   2. Please tell us about your environment:
   version: rocketmq-4.5.2
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   There may be something wrong at `HAService.GroupTransferService.doWaitTransfer` as follow:
   `for (int i = 0; !transferOK && i < 5; i++) { `
   ` this.notifyTransferObject.waitForRunning(1000);  `
   `  transferOK = HAService.this.push2SlaveMaxOffset.get() >= req.getNextOffset();`
   ` }`
   
   haTransferBatchSize is default 32K, if a message is larger than 32K, it would transfer 32K each time and transfer many times. If message is larger than 5*32K, then it will be transfer at least 6 times. Each time slave receive data and ack to master, the `notifyTransferObject` would be notified.   When the 5th notified, the loop would exit and than transferOk is still false because 6th transfer not finished. 
   In addition, if a message need to be transfer more than 10 times, the result of next message just behind this message would be wrong even it's a small message less than 32K.
   
   Sending batch message is much easier to trigger this bug becasue single message would be compressed when it is larger than 4K.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services