[GODRIVER-1572] Reduce race conditions in SDAM error handling Created: 13/Apr/20  Updated: 28/Oct/23  Resolved: 26/Jun/20

Status: Closed
Project: Go Driver
Component/s: Server Discovery and Monitoring
Affects Version/s: None
Fix Version/s: 1.4.0

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

Issue Links:
Depends
Duplicate
is duplicated by GODRIVER-1602 Resync SDAM error handling spec tests Closed
Epic Link: Go MongoDB 4.4 Support

 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 [ 29/Jun/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-1572 Fix server description creation for network errors (#435)

Server descriptions used to set the server to Unknown after a network
error should not have TopologyVersion set because they always need to be
applied to the topology.
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/09ccd6fca3f93c26d6b2c74c40ed4ba4705eb163

Comment by Githook User [ 26/Jun/20 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1572 reduce race conditions in SDAM error handling (#425)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/47996f369c3567c5669129d1af77ebac0f92ae6b

Comment by Githook User [ 11/May/20 ]

Author:

{'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-1572 add TopologyVersion (#403)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/a50f838877ed84bcb1f671b0f5d9004c38298dad

Generated at Thu Feb 08 08:36:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.