Skip to content

Wait for future completions in parallel in Function Executor when waiting in FIRST_COMPLETED or FIRST_FAILURE mode #411

@eabatalov

Description

@eabatalov

FE currently waits on futures serially, so if the first future in the list takes longer than the seconds we still wait until the first completes. This adds extra latency to FIRST_COMPLETED and FIRST_FAILURE wait modes and results in clearly surprising behavior i.e. first future completes in 5 minutes and second completes in 2 secs but we return from wait in 5 minutes.

See test_futures_wait.py api_function_return_when_first_completed function and api_function_return_when_first_failure function. They are testing this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions