Skip to content

Backoff in the DirectRunner Monitor if no work is Available #18070

@kennknowles

Description

@kennknowles

When a Pipeline has no elements available to process, the Monitor Runnable will be repeatedly scheduled. Given that there is no work to be done, this will loop over the steps in the transform looking for timers, and prompt the sources to perform additional work, even though there is no work to be done. This consumes the entirety of a single core.

Add a bounded backoff to rescheduling the monitor runnable if no work has been done since it last ran. This will reduce resource consumption on low-throughput Pipelines.

Imported from Jira BEAM-690. Original Jira may contain additional context.
Reported by: tgroh.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions