areyouok commented on pull request #3382:
URL: https://github.com/apache/rocketmq/pull/3382#issuecomment-976101945


   
2、你的意思是把broker设置为只读,影响太大了。但我的意思是,按目前的修改,发生IO故障以后,接下来每次发送都会返回失败。这比把Broker设置为只读更糟糕的结果,影响更大。我提出的把Broker设置只读,client接下来会把请求发到其它健康的broker去,对用户几乎没有影响,是一个影响更小的方案。
   
   3、目前rocketmq的send方法是:
   ```java
   public SendResult send(Message msg) throws MQClientException, 
RemotingException, MQBrokerException, InterruptedException
   ```
   
如果没有丢出异常返回了SendResult(里面包含SendStatus),4个返回码都是成功,其它错误都是丢异常的,刷盘异常是非常严重的错误,它很可能已经不可恢复了,应该丢出MQBrokerException。
   
   另外,MappedByteBuffer.force()对于远程存储是没有保证的:
   
   ```
   If the file does not reside on a local device then no such guaranteeis made.
   ```


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