Skip to content

Commit

Permalink
fix(kafka-scaler): return error if partition processing fails (kedaco…
Browse files Browse the repository at this point in the history
…re#4149)

Signed-off-by: Sergej Domme <sergej.domme@idealo.de>
  • Loading branch information
sdomme authored Feb 6, 2023
1 parent 629f9e8 commit c0c9949
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ Here is an overview of all new **experimental** features:
- **Azure Service Bus Scaler:** Use correct auth flows with pod identity ([#4026](https://github.com/kedacore/keda/issues/4026)|[#4123](https://github.com/kedacore/keda/issues/4123))
- **Cassandra Scaler**: Checking whether the port information is entered in the ClusterIPAddres is done correctly. ([#4110](https://github.com/kedacore/keda/issues/4110))
- **CPU Memory Scaler** Store forgotten logger ([#4022](https://github.com/kedacore/keda/issues/4022))
**Kafka Scaler**: Support 0 in activationLagThreshold configuration ([#4137](https://github.com/kedacore/keda/issues/4137))
- **Kafka Scaler**: Return error if the processing of the partition lag fails ([#4098](https://github.com/kedacore/keda/issues/4098))
- **Kafka Scaler**: Support 0 in activationLagThreshold configuration ([#4137](https://github.com/kedacore/keda/issues/4137))
- **Prometheus Metrics**: Expose Prometheus Metrics also when getting ScaledObject state ([#4075](https://github.com/kedacore/keda/issues/4075))
- **Redis Scalers**: Fix panic produced by incorrect logger initialization ([#4197](https://github.com/kedacore/keda/issues/4197))

Expand Down
5 changes: 4 additions & 1 deletion pkg/scalers/kafka_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,10 @@ func (s *kafkaScaler) getTotalLag() (int64, int64, error) {

for topic, partitionsOffsets := range producerOffsets {
for partition := range partitionsOffsets {
lag, lagWithPersistent, _ := s.getLagForPartition(topic, partition, consumerOffsets, producerOffsets)
lag, lagWithPersistent, err := s.getLagForPartition(topic, partition, consumerOffsets, producerOffsets)
if err != nil {
return 0, 0, err
}
totalLag += lag
totalLagWithPersistent += lagWithPersistent
}
Expand Down

0 comments on commit c0c9949

Please sign in to comment.