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 2021/04/02 07:29:33 UTC

[GitHub] [rocketmq] EZLippi opened a new issue #2777: pull request will not stop after topic being deleted

EZLippi opened a new issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777


   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   consumer is subscribing a topic, when modify topic permission to not readable or just delete this topic, we hope to see the consumer will not dispatch pull request to broker , but actually pull request will always ongoing with a exception except restart the consumer.
   the exception stack trace is like this:
   `2021-04-02 15:24:54.018 WARN [NettyClientPublicExecutor_2:RocketmqClient:130] execute the pull request exception
   org.apache.rocketmq.client.exception.MQBrokerException: CODE: 17  DESC: topic[topic-flash2] not exist, apply first please! 
   See http://rocketmq.apache.org/docs/faq/ for further details. BROKER: 192.168.60.39:10911
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.processPullResponse(MQClientAPIImpl.java:794) ~[rocketmq-client-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.access$200(MQClientAPIImpl.java:167) ~[rocketmq-client-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl$2.operationComplete(MQClientAPIImpl.java:745) [rocketmq-client-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.remoting.netty.ResponseFuture.executeInvokeCallback(ResponseFuture.java:54) [rocketmq-remoting-4.8.0.jar:4.8.0]
   	at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract$2.run(NettyRemotingAbstract.java:319) [rocketmq-remoting-4.8.0.jar:4.8.0]
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_211]
   	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [?:1.8.0_211]
   	at java.util.concurrent.FutureTask.run(FutureTask.java) [?:1.8.0_211]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_211]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_211]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]`
   
   as the code show below, when there is no queue left for a topic , a exception will throw from AllocateStrategy, 
   then processQueueTable will not be updated
   
   ![image](https://user-images.githubusercontent.com/5326814/113392601-f6017e00-93c7-11eb-9178-30c75935062e.png)
   
   
   2. Please tell us about your environment:
   rocketmq 4.8.0


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



[GitHub] [rocketmq] panzhi33 edited a comment on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
panzhi33 edited a comment on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-812475819


   这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息,那么mqSet也就不会变。
   cidSet是根据ConsumerId来决定的。
   


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



[GitHub] [rocketmq] felayman commented on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
felayman commented on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-816463544


   > > 这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   > > 负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   > > 获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息,那么mqSet也就不会变。
   > > cidSet是根据ConsumerId来决定的。
   > 
   > topic不可读, 或者topic被删除了, mqSet会变, 消费者更新topicSubscribeInfoTable前会筛选只读的队列更新到map, 下次rebalance时拿到的mqSet就是空的, 所以才抛出了异常导致没有执行后续的逻辑
   
   我看了代码,如果mqSet是空的,不会执行截图中红线圈的地方,执行这段逻辑的分支条件是:mqSet != null && cidAll != null


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



[GitHub] [rocketmq] panzhi33 commented on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-813939972


   > > 这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   > > 负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   > > 获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息,那么mqSet也就不会变。
   > > cidSet是根据ConsumerId来决定的。
   > 
   > topic不可读, 或者topic被删除了, mqSet会变, 消费者更新topicSubscribeInfoTable前会筛选只读的队列更新到map, 下次rebalance时拿到的mqSet就是空的, 所以才抛出了异常导致没有执行后续的逻辑
   
   对,看了下代码,topic不可读确实会改变mqSet


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



[GitHub] [rocketmq] panzhi33 commented on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-812475819


   这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息,那么mqSet也就不会变。
   cidSet是根据ConsumerId来决定的。
   


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



[GitHub] [rocketmq] EZLippi commented on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
EZLippi commented on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-813842519


   > 这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   > 负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   > 获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息,那么mqSet也就不会变。
   > cidSet是根据ConsumerId来决定的。
   
   topic不可读, 或者topic被删除了, mqSet会变, 消费者更新topicSubscribeInfoTable前会筛选只读的队列更新到map, 下次rebalance时拿到的mqSet就是空的, 所以才抛出了异常导致没有执行后续的逻辑


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



[GitHub] [rocketmq] panzhi33 edited a comment on issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
panzhi33 edited a comment on issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777#issuecomment-812475819


   这种操作属于非标操作,既然有消费者在线,那么就应该知道执行的后果。因此我觉得这不是bug。
   负载均衡这里是正常的,因为 mqSet和cidSet 是一直没有变的。
   获取topic路由哪里,如果找不到topic的话,会抛出异常,并不会更新路由信息(这里应该是要提示首次启动的消费者,告知topic没有创建),那么mqSet也就不会变。
   cidSet是根据ConsumerId来决定的。
   


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



[GitHub] [rocketmq] vongosling closed issue #2777: pull request will not stop after topic being deleted

Posted by GitBox <gi...@apache.org>.
vongosling closed issue #2777:
URL: https://github.com/apache/rocketmq/issues/2777


   


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