[CSHARP-2571] Prefer connectionId from isMaster response to connectionid from getLastError response Created: 02/Apr/19  Updated: 28/Oct/23  Resolved: 06/Feb/20

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: 2.11.0
Fix Version/s: 2.11.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Mikalai Mazurenka (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-10637 Provide a mechanism to expose the con... Closed
Related
related to CSHARP-3191 driver tries to run getLastError on m... Closed
Server Compat: 4.1

 Description   

The C# driver currently executes the getLastError command as part of the server handshake, in order to get the connectionId from its response. This is useful for logging and monitoring connection use and correlating with server log files. As of 4.2, the server will return the connectionId in the isMaster response, which the driver has to execute anyway on every connection. If the driver detects a connectionId in the isMaster response, it should just use it and not execute getLastError.



 Comments   
Comment by Githook User [ 06/Feb/20 ]

Author:

{'username': 'MikalaiMazurenka', 'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com'}

Message: CSHARP-2571: Prefer connectionId from isMaster response to connectionid from getLastError response
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/0fa0995dad02ba33632f320bb238ced50ca14039

Generated at Wed Feb 07 21:42:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.