[CSHARP-3057] Reduce race conditions in SDAM error handling Created: 13/Apr/20  Updated: 28/Oct/23  Resolved: 03/Jun/20

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

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Vincent Kam (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CSHARP-2126 Change handling of network errors or ... Closed
depends on CSHARP-3114 Change handling of network errors or ... Closed
Related
is related to CSHARP-3119 Update SDAM to not request immediate ... Backlog
is related to CSHARP-2433 Connections survive primary stepdown Closed
is related to CSHARP-3115 Connections survive primary stepdown ... Closed
is related to CSHARP-3114 Change handling of network errors or ... Closed
is related to CSHARP-3128 Use Interlocker.CompareExchange in th... Backlog
is related to CSHARP-3088 Resync SDAM error handling spec tests Closed
Epic Link: CSHARP-2932
Backwards Compatibility: Minor Change

 Description   

Summary of required driver work:

Reduce race conditions in SDAM error handling. In summary, drivers will update their SDAM and error handling logic to:

Add topologyVersion field to ServerDescription.
Ignore stale errors based on generation number and topologyVersion.
Implement SDAM spec tests for topologyVersion comparison.
Implement SDAM spec tests for handling mock application errors with the new tests in the tests/errors directory.

Spec changes:

Spec commit (part 1 of 2):
Author:

{'name': 'Shane Harvey', 'email': 'shane.harvey@mongodb.com', 'username': 'ShaneHarvey'}

Message: SPEC-1663 Reduce race conditions in SDAM error handling (#781)
Add topologyVersion field to ServerDescription.
Add SDAM spec tests for topologyVersion comparison.
Clients ignore stale errors based on generation number and topologyVersion.
Branch: master
https://github.com/mongodb/specifications/commit/7dd9c008be6edaf65368787d5e91c2ac3aeb95b8

Spec commit (part 2 of 2):
Author:

{'name': 'Shane Harvey', 'email': 'shane.harvey@mongodb.com', 'username': 'ShaneHarvey'}

Message: SPEC-1663 Add SDAM tests for detecting stale application errors (#787)
Add applicationErrors to configure mock errors.
Add pool generation to outcome assertion.
Add optional "description" field to each phase.
Add tests for network errors before/after handshake completes.
Add tests for not master errors pre/post 4.2.
Branch: master
https://github.com/mongodb/specifications/commit/371e95b18f4783d485218bb1565970be10568e8a
See DRIVERS-1187 for updated details.



 Comments   
Comment by Githook User [ 03/Jun/20 ]

Author:

{'name': 'vincentkam', 'email': 'vincent.kam@10gen.com', 'username': 'vincentkam'}

Message: CSHARP-3057: Reduce race conditions in SDAM error handling
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/297fcd723ff32aac47b7b018c978ec4baf0773d7

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