[SERVER-52665] Wait for latest operation to be committed on all config secondaries in sessions_collection_auto_healing.js Created: 06/Nov/20  Updated: 29/Oct/23  Resolved: 22/Jan/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-01-25
Participants:
Linked BF Score: 10

 Description   

jstests/sharding/sessions_collection_auto_healing.js expects a mongos can write its in-memory logical sessions to the durable sessions collection after the collection is created by an earlier refresh run on the config server. As part of writing its sessions, the mongos first checks if the sessions collection exists by refreshing from the config server, which reads from config.collections with majority read concern and nearest read preference. This can fail to find a newly sharded collection if the read targets a stale secondary outside the majority that first committed the sharded collection.

To guarantee the mongos refresh discovers the newly sharded collection, the test should wait for the latest operation on the config server primary to become committed on all secondaries by calling rs.awaitLastOpCommitted() on the config server before triggering this refresh on the mongos.



 Comments   
Comment by Githook User [ 21/Jan/21 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-52665: Add a barrier to sessions_collection_auto_healing after creating a collection and before forcing a cache refresh.
Branch: master
https://github.com/mongodb/mongo/commit/763da4abe462c3f704408de7592e858c4935e622

Generated at Thu Feb 08 05:28:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.