Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Commit

Permalink
fix non-dlq backlog
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranrg committed Aug 18, 2017
1 parent 6c639d2 commit 4b6b9b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/controllerhost/queueDepth.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,9 @@ func (qdc *queueDepthCalculator) computeBacklog(cgDesc *shared.ConsumerGroupDesc
backlog = storeMetadata.lastSequence - storeMetadata.beginSequence + 1
}
} else {
// update backlog, only if there is an available seqnum
if storeMetadata.availableSequence != math.MaxInt64 {
// update backlog, only if there is an available seqnum. see comment above for interpretation
// of "0" and "MaxInt64".
if storeMetadata.availableSequence != 0 && storeMetadata.availableSequence != math.MaxInt64 {
backlog = storeMetadata.availableSequence - cgExtent.GetAckLevelSeqNo()
}
}
Expand Down

0 comments on commit 4b6b9b5

Please sign in to comment.