Skip to content

Estimator shows estimated lag but processor is not processing #69

@karpikpl

Description

@karpikpl

It seems that scaling metric is not precise enough.

Scaler is reporting items to process:

Lease [0] owned by host Instance-cosmosdb-order-processor-585d7b9bc5-gnb88 reports 37 as estimated lag.
Lease [1] owned by host Instance-cosmosdb-order-processor-585d7b9bc5-5jdb2 reports 38 as estimated lag.
There are 2 partitions with estimated lag.

But processor is not getting any items:

k logs cosmosdb-order-processor-585d7b9bc5-gnb88 -n cosmosdb-order-processor
2024-06-13 01:39:00 info: Keda.CosmosDb.Scaler.Demo.OrderProcessor.Worker[0]
      Started change feed processor instance Instance-cosmosdb-order-processor-585d7b9bc5-gnb88
2024-06-13 01:39:00 info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
2024-06-13 01:39:00 info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
2024-06-13 01:39:00 info: Microsoft.Hosting.Lifetime[0]
      Content root path: /app

I verified both are connected to the same DB using a test app that used same client for estimator and feed processor.

Expected Behavior

Pods are scaled to 0 when there's nothing to process.
Pods are processing items when scaler reports estimated changes.

Actual Behavior

Scaler reports changes but processor is not doing anything.

Steps to Reproduce the Problem

  1. Run Demo App on a multi-partition container
  2. Generate some data (may need to do it few times)
  3. Observe the pods

Specifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions