Skip to content

Server-side task rate-limit skips intervals or completely makes not progress for fractional values of worker_activities_per_second #7976

@dkrotx

Description

@dkrotx

Description

Cadence allows fractional worker_activities_per_second. For instance, worker_activities_per_second=0.167 expected to pass one activity every 6 seconds, but instead some (or most) workflows are not making progress at all.

Steps to Reproduce / How to Trigger

Add the following config to the client' task-list configuration section:

options:
        task_list_activities_per_second: 0.167

Then start 10 hello-world workflows (with big enough ScheduleToStart timeouts).

Expected Behavior

Workflows are finished every 6 seconds (they have only one activity): first workflow finished immediately, second one after 6 seconds, etc. All 10 workflows launched at the same time should succeed within 54 seconds.

Actual Behavior

Actual behaviour is flaky. Sometimes multiple workflows succeed, but often it is just two - others are getting timed out. Every time you can notice some internals are skipped: first workflow finished immediately, then second finished in 12 seconds (not in 6), next one in 30 seconds (18s and 24s intervals are like "skipped").

Logs / Screenshots

Image

Environment

  • Cadence server version: master:head
  • Cadence SDK language and version (if applicable): Language and SDK version
  • Cadence web version (if applicable): Web UI version
  • DB & version: sqlite, but same happens with Cassandra
  • Scale: 1 local instance of cadence-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-infoNeeds additional information from the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions