mattermost/mattermost

Implement timeout logic for potentially time unbounded tasks

Offen

#25.322 geöffnet am 06.11.2023

 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (7.823 Forks)batch import
Help Wanted

Repository-Metriken

Stars
 (32.880 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

We should add some timeout logic when spawning potentially time unbounded goroutines that call code we don’t directly control (e.g. a dependency). For example, this is the case of the file attachment content extraction. These goroutines can take a long time to return (or even fail to do so) causing both a leak and a potential deadlock when shutting down the server.

See https://github.com/mattermost/mattermost/pull/25227 for more context and a real world issue.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-55260

Contributor Guide