Skip to content

Commit

Permalink
fix request offset not changed in some case (#844)
Browse files Browse the repository at this point in the history
Co-authored-by: dengzhiwen1 <[email protected]>
  • Loading branch information
cserwen and dengzhiwen1 authored Jul 21, 2022
1 parent ad827de commit a05a720
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consumer/push_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ func (pc *pushConsumer) pullMessage(request *PullRequest) {
goto NEXT
}

pc.processPullResult(request.mq, result, sd)

switch result.Status {
case primitive.PullFound:
rlog.Debug(fmt.Sprintf("Topic: %s, QueueId: %d found messages.", request.mq.Topic, request.mq.QueueId), nil)
Expand All @@ -779,8 +781,6 @@ func (pc *pushConsumer) pullMessage(request *PullRequest) {
rt := time.Now().Sub(beginTime) / time.Millisecond
pc.stat.increasePullRT(pc.consumerGroup, request.mq.Topic, int64(rt))

pc.processPullResult(request.mq, result, sd)

msgFounded := result.GetMessageExts()
firstMsgOffset := int64(math.MaxInt64)
if len(msgFounded) != 0 {
Expand Down

0 comments on commit a05a720

Please sign in to comment.