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 2022/04/18 13:00:13 UTC

[GitHub] [rocketmq-client-go] hjxp opened a new pull request, #814: fix pullThresholdSizeForTopic invalid

hjxp opened a new pull request, #814:
URL: https://github.com/apache/rocketmq-client-go/pull/814

   fix pullThresholdSizeForTopic invalid


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] ShannonDing merged pull request #814: fix pullThresholdSizeForTopic invalid

Posted by GitBox <gi...@apache.org>.
ShannonDing merged PR #814:
URL: https://github.com/apache/rocketmq-client-go/pull/814


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] ShannonDing commented on a diff in pull request #814: fix pullThresholdSizeForTopic invalid

Posted by GitBox <gi...@apache.org>.
ShannonDing commented on code in PR #814:
URL: https://github.com/apache/rocketmq-client-go/pull/814#discussion_r926631677


##########
consumer/consumer.go:
##########
@@ -658,27 +658,28 @@ func (dc *defaultConsumer) updateProcessQueueTable(topic string, mqs []*primitiv
 	dc.processQueueTable.Range(func(key, value interface{}) bool {
 		mq := key.(primitive.MessageQueue)
 		pq := value.(*processQueue)
-		if mq.Topic == topic {
-			if !mqSet[mq] {
-				pq.WithDropped(true)
-				if dc.removeUnnecessaryMessageQueue(&mq, pq) {
-					dc.processQueueTable.Delete(key)
-					changed = true
-					rlog.Debug("remove unnecessary mq when updateProcessQueueTable", map[string]interface{}{
-						rlog.LogKeyConsumerGroup: dc.consumerGroup,
-						rlog.LogKeyMessageQueue:  mq.String(),
-					})
-				}
-			} else if pq.isPullExpired() && dc.cType == _PushConsume {
-				pq.WithDropped(true)
-				if dc.removeUnnecessaryMessageQueue(&mq, pq) {
-					dc.processQueueTable.Delete(key)
-					changed = true
-					rlog.Debug("remove unnecessary mq because pull was paused, prepare to fix it", map[string]interface{}{
-						rlog.LogKeyConsumerGroup: dc.consumerGroup,
-						rlog.LogKeyMessageQueue:  mq.String(),
-					})
-				}
+		if mq.Topic != topic {

Review Comment:
   this should deal with all message queue.



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org