[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: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| 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: |
| Comments |
| Comment by Githook User [ 25/Apr/23 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 14/Apr/23 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| 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 |