[SERVER-72065] The logical sessions cache cannot be refreshed in secondary nodes of the CSRS Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 14/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.1.0, 6.0.3, 6.2.0-rc1
Fix Version/s: 6.0.4, 6.2.0-rc5, 6.3.0-rc0

Type: Bug Priority: Critical - P2
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-66078 Adapt sessions collection balacing po... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.2, v6.1, v6.0
Sprint: Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26
Participants:

 Description   

SERVER-66078 added an extra step to the lazy initialisation of the config.system.sessions collection performed by SessionsCollectionConfigServer to also persist a custom value for its max chunk size. As any write operation, such extra step should only be performed when running process acts as the primary node of the CSRS.

Nevertheless, there is no condition in place to prevent the new logic from also being executed by secondary nodes - and raising a PrimarySteppedDown error when a write is attempted.

This is causing the periodic refresh of the logical session caches in the CSRS secondary nodes to fail on each iteration when setupSessionsCollection() is invoked.



 Comments   
Comment by Githook User [ 19/Dec/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-72065 Fix refresh of sessions cache in CSRS secondary nodes
Branch: v6.2
https://github.com/mongodb/mongo/commit/e86b8c099ecf56fab4913d3fb94a8482953d08d4

Comment by Githook User [ 17/Dec/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-72065 Fix refresh of sessions cache in CSRS secondary nodes
Branch: v6.0
https://github.com/mongodb/mongo/commit/86879bd6bc684703083729f979c43a5788979014

Comment by Githook User [ 16/Dec/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-72065 Use GlobalLock to invoke canAcceptWritesFor() in SessionsCollectionConfigServer
Branch: master
https://github.com/mongodb/mongo/commit/f02a899583eb2502dee04b78c929754041cc834c

Comment by Githook User [ 14/Dec/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-72065 Fix refresh of sessions cache in CSRS secondary nodes
Branch: master
https://github.com/mongodb/mongo/commit/43c5e7d26928b45ed4b44d81ed33e46682db58b2

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