Correctly account for cpu usage by background threads (#4074)
Wrap calls to deferToThread() in a thing which uses a child logcontext to attribute CPU usage to the right request. While we're in the area, remove the logcontext_tracer stuff, which is never used, and afaik doesn't work. Fixes #4064
Showing
- changelog.d/4074.bugfix 1 addition, 0 deletionschangelog.d/4074.bugfix
- synapse/handlers/auth.py 4 additions, 14 deletionssynapse/handlers/auth.py
- synapse/rest/media/v1/media_repository.py 14 additions, 10 deletionssynapse/rest/media/v1/media_repository.py
- synapse/rest/media/v1/media_storage.py 5 additions, 3 deletionssynapse/rest/media/v1/media_storage.py
- synapse/rest/media/v1/storage_provider.py 4 additions, 2 deletionssynapse/rest/media/v1/storage_provider.py
- synapse/util/logcontext.py 69 additions, 51 deletionssynapse/util/logcontext.py
Loading
Please register or sign in to comment