When the `setUp()` method of AuthorizationSessionTest replaces the existing AuthorizationManager attached to the global ServiceContext with another AuthorizationManager instance, it causes a race with the JournalFlusher thread, which gets started earlier (in the ServiceContextMongoDTest constructor) and tries to acquire a pointer to the current global AuthorizationManager.
One fix is to ensure that we perform the replacement of the AuthorizationManager, before the JournalFlusher (or any other thread that creates a authorization session) is started.
- related to
-
SERVER-85377 Fix data race in AuthorizationSessionTestFixture
- Closed