[SERVER-75792] Fix session handling in movePrimary coordinator Created: 06/Apr/23  Updated: 29/Oct/23  Resolved: 14/Apr/23

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

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File move_primary_session.patch    
Issue Links:
Backports
Depends
is depended on by SERVER-76050 Enhance session handling in each coor... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0
Sprint: Sharding EMEA 2023-04-17
Participants:

 Description   

We must make sure sessions are updated before every command we send from within the coordinator. For sure there are two places in which we are not doing so as suggested in the following patch:

move_primary_session.patch



 Comments   
Comment by Githook User [ 25/Apr/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-75792 Fix session handling in movePrimary coordinator
Branch: v7.0
https://github.com/mongodb/mongo/commit/66f661788b272ce38ee8a99f845a29503c53c7a1

Comment by Githook User [ 14/Apr/23 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-75792 Fix session handling in movePrimary coordinator
Branch: master
https://github.com/mongodb/mongo/commit/424a3d3cd9f684e47b29595ad5b8098d3a1266b0

Comment by Antonio Fuschetto [ 13/Apr/23 ]

Instead of upgrading the session before every command invocation (that is very error prone), the getNewSession() function has been implemented in order to be used as an argument of each command invocation. This approach reduces the risk of to reuse a session and it's suitable for the `movePrimary` implementation. The same approach can be reused by any other coordinator (see SERVER-76050).

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