Skip to content

Commit

Permalink
Revert irrelevant file
Browse files Browse the repository at this point in the history
Signed-off-by: Dao Thanh Tung <ttdao.2015@accountancy.smu.edu.sg>
  • Loading branch information
dttung2905 committed Dec 16, 2023
1 parent a4fd091 commit 93a14bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/scalers/kafka_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,8 @@ func (s *kafkaScaler) getLagForPartition(topic string, partitionID int32, offset
} else {
s.previousOffsets[topic][partitionID] = consumerOffset
}
case previousOffset == consumerOffset || previousOffset < 0:
// Indicates consumer is still on the same offset as the previous polling cycle or the errorneous offset ( < 0),
// there may be some issue with consuming this offset.
case previousOffset == consumerOffset:
// Indicates consumer is still on the same offset as the previous polling cycle, there may be some issue with consuming this offset.
// return 0, so this consumer lag is not considered for scaling
return 0, latestOffset - consumerOffset, nil
default:
Expand Down

0 comments on commit 93a14bd

Please sign in to comment.