-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
Since Mongo 4.4, we are getting spurious errors in our test suite because there is a delay between the creation of a mongo user and the access rights being actually available, but only in sharded clusters.
Our test creates a user that has a read only role to a single database and then instantly tries reading from the database using this user. On 4.4 this test fails about 90% of the time. It seems like there is a delay in the propagation of access rights.
I tried adding a delay of 10 seconds between the call to create the user and the call that tests the access rights and the issue no longer appears.
So it seems like in Mongo 4.4 user creation and/or propagation is asynchronous, but I could not find anything in the docs about this. I tried setting the write concern to all nodes but that does not fix it.