Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

run_in_background calls whose return value is discarded can re-start finished logging contexts #13090

@squahtx

Description

@squahtx

A more general version of #12987.

When we launch a task using run_in_background, the task inherits the current logging context. If we neglect to await the task, we may finish our current logging context while the background task is still using it. We ought to either await such background tasks or give them their own logging contexts.

clokep notes that we can find such calls using grep -r " run_in_background" synapse and there are a few places we do so.

Note that it does not make sense to write await make_deferred_yieldable(run_in_background(f, ...)), as it could be written as await f(...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-TolerableMinor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions