[SERVER-75016] Tenant Migration Change Streams test should wait for replication Created: 17/Mar/23  Updated: 29/Oct/23  Resolved: 24/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mathis Bessa Assignee: Christopher Caplinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Serverless
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 33

 Description   

There is a potential race condition in the shard split change stream test where calling `getTenantConnection` on secondary nodes could result in `NotWritablePrimary` (see investigation here) when the method attempts to create a user after not finding it.

We should make sure that after calling `getTenantConnection` on the primary (which creates a new user for the tenant connection) that replication happened before calling getTenantConnection on the secondaries.

We should also consider making the change in this shard merge test as well.



 Comments   
Comment by Githook User [ 23/Mar/23 ]

Author:

{'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}

Message: SERVER-75016: Change streams tests wait for replication
Branch: master
https://github.com/mongodb/mongo/commit/26b2872545d103694b68d0531dc1fb4383a95543

Generated at Thu Feb 08 06:29:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.