[SERVER-76050] Enhance session handling in each coordinator Created: 13/Apr/23  Updated: 29/Oct/23  Resolved: 19/May/23

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

Type: Bug Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: Silvia Surroca
Resolution: Fixed Votes: 0
Labels: auto-reverted, shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-75792 Fix session handling in movePrimary c... Closed
Problem/Incident
causes SERVER-77555 Fix collmod deadlock with stepdowns Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.3, v6.0, v5.0
Sprint: Sharding EMEA 2023-05-01, Sharding EMEA 2023-05-15, Sharding EMEA 2023-05-29
Participants:
Linked BF Score: 158
Story Points: 7.5

 Description   

In order to ensure the idempotence of a command, the session must be updated for each invocation. In fact, the session ID and the transaction number ensure that no stale requests arrive. Updating the sessione and then invoke che command with the current (updated) session is error prone as there is the risk of reuse an already used session ID.

With SERVER-75792, the getNewSession() function has been implemented in order to be used as an argument of each command invocation. The goal of this ticket is use this approach for all the DDL coordinators.



 Comments   
Comment by Githook User [ 08/Jun/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-76050 Enhance session handling in each coordinator
Branch: v7.0
https://github.com/mongodb/mongo/commit/730bc863f986a3ecccd21d4bb768fe332ae05fbb

Comment by Githook User [ 19/May/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-76050 Enhance session handling in each coordinator
Branch: master
https://github.com/mongodb/mongo/commit/6f0d8fb19f95cdc11e6b9006ec6389f3d1f9e8ac

Comment by xgen-buildbaron-user [ 13/May/23 ]

Ticket re-opened due to revert. change_streams_whole_cluster_secondary_reads_sharded_collections began a consistent failure of jstests/change_streams/ddl_view_events.js

Comment by Githook User [ 13/May/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-76050 Enhance session handling in each coordinator"

This reverts commit 5a8c52c0de24d8ddeb4a7d3b90ef5942c53cbd14.
Branch: master
https://github.com/mongodb/mongo/commit/68145fa6580490c6d6d1e3829359f3260be8f9bc

Comment by Githook User [ 12/May/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-76050 Enhance session handling in each coordinator
Branch: master
https://github.com/mongodb/mongo/commit/5a8c52c0de24d8ddeb4a7d3b90ef5942c53cbd14

Comment by Sergi Mateo Bellido [ 20/Apr/23 ]

I =    5    ,C=    3    ,E=    2     > ICE=    7.5

Comment by Antonio Fuschetto [ 13/Apr/23 ]

Taking a look at some DDL coordinators, I noticed at least one bug — the renameCollection coordinator uses the same session to invoke three commands. This must be addressed in the context of this ticket.

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