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.

Prevent multiple instances of shutting down the same room simultaneously #10797

@anoadragon453

Description

@anoadragon453

We had a process attempt to shut down the same room using two, separate calls to the Admin API:

  • DELETE /_synapse/admin/v1/rooms/{roomId}
  • POST /_synapse/admin/v1/{roomId}/delete

Both of these method handlers eventually call RoomShutdownHandler.shutdown_room, and there doesn't look to be any code that deduplicates requests anywhere.

This lead to a state where two long-running shutdown processes for the same room occurred and choked the main processes' CPU, resulting in the need to restart the main process to recover its performance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-MinorBlocks non-critical functionality, workarounds exist.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