You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@rocketmq.apache.org by Miracle <10...@qq.com> on 2018/10/26 07:29:03 UTC
大消息发送问题
你好,
服务器集群配置同步双写,同步刷盘。当我用同步接口在发送一个大的数据时(500k的数据,不启动压缩),每次都会返回FLUSH_SLAVE_TIMEOUT。当我配置syncFlushTimeout=30000,还是返回FLUSH_SLAVE_TIMEOUT。在源码中发现
public boolean waitForFlush(long timeout){
… this.countDownLatch.await(timeout,TimeUnit.MILISECONDS);
return this.flushOK;
…
}
countDownLatch已经被HAService#doWaitTransfer中req.wakeupCustomer(transferOK)释放。
通过打印日志追踪到slave多次向master上报最新offset(大于5次),导致HAService#doWaitTransfer在5次内没有同步到req.getNextOffset()最终返回transferOK=false。
请问这种情况该如何解决?
感谢!