Fix locking in the extension manager.
Review Request #15036 — Created May 9, 2026 and submitted — Latest diff uploaded
I've noticed that sometimes when our CI server is under high load, we
were getting an intermittent test failure in
ExtensionManagerTests.test_install_media_concurrent_threads.This lead me to discover that in Django 3.2,
django.core.files.locks.lock()changed its interface to returnFalse
instead of raiseIOError. This meant that our use of this has not
actually been using the lock at all. This change updates the extension
manager to check the return value and raise an IOError to restore the
behavior described in the docstring.
- Ran unit tests.
- Artificially created a high load situation and verified that prior to
the fix we would hit contention, and after we properly respect the lock. - Grepped through our codebases to ensure there weren't any other
similar bugs.