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/18 07:21:25 UTC

[GitHub] [rocketmq] areyouok commented on issue #1543: [#1540] 4.5.2版本 事务消息设置延迟时间后导致RMQ_SYS_TRANS_HALF_TOPIC爆掉的问题修复

areyouok commented on issue #1543: [#1540] 4.5.2版本 事务消息设置延迟时间后导致RMQ_SYS_TRANS_HALF_TOPIC爆掉的问题修复
URL: https://github.com/apache/rocketmq/pull/1543#issuecomment-543563883
 
 
   @TonyStark888 如果你在关注事务消息,可以看一下我的fix
   
   https://github.com/areyouok/rocketmq/commits/4.5.2.fix
   
   我们的结论是当前版本4.5.2的事务消息不是生产可用的。当前我们一共发现4个问题,自定义事务超时时间的功能我们没有使用,所以没太关注。
   
   问题1,会导致每60秒内,最多有6秒(默认事务超时时间)的所有消息需要回查,我在这里进行了修复:
   
   https://github.com/areyouok/rocketmq/commit/a9d43fba4a3c5a9284dcb8ba2cbf218f80422e44
   
   问题2,end transaction打印日志过多,包括把消息正文以文本形式打印到日志中,这样在一定的压力下,end transaction的速度跟不上半消息的发送速度,最后end transaction就限流了(但是半消息发送没有限流),导致大量事务半消息发送成功但是commit操作全部丢失,这些消息最后都要回查,我在这里进行了修复:
   
   https://github.com/areyouok/rocketmq/commit/7393d5d2dc102403286da21d0cdc0403f9620662
   
   问题3:回查任务线程的ExecutorService的queue满2000以后,没有处理RejectedExecutionException,异常退出前renew了很多半消息,但是异常退出的时候没有处理移动位点。前面问题1、2导致了大量需要回查的半消息堆积,现在再加上问题3,这个时候集群就死全家了,会无限renew半消息。我们在生产环境下做压测,只进行了大约1个小时的压测,然后集群就陷入无限renew半消息的状态,过了两天3T的磁盘都要满了。我在这里进行了修复:
   
   https://github.com/areyouok/rocketmq/commit/d45005b69e4ce63261513f9c47d9696576fdff69
   
   问题4:op队列的位点要到下次检查的时候才移动,目前没有直接观察到严重后果,但是会影响性能,毕竟事务回查调度只有1个线程,堆积起来后果还是很严重的,我在这里进行了修复:
   
   https://github.com/areyouok/rocketmq/commit/abb05f0095830300a9ef539556b784bc62077b33
   
   

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