[GODRIVER-1507] SRV polling not performed if the URI is not passed to the topology Created: 02/Mar/20  Updated: 28/Oct/23  Resolved: 03/Mar/20

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.1

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to GODRIVER-2056 SRV polling is not spawned because op... Closed
is related to GODRIVER-2057 SRV polling is not spawned because op... Closed

 Description   

We stopped using the topology.WithConnString option after introducing ApplyURI but this means that the topology doesn't know the URI used to create the Client and therefore cannot actually do things like SRV polling for mongos discovery.

I propose the following:

  1. Store the initial URI in ClientOptions and add a ClientOptions.GetURI method. If ApplyURI was never called during construction, this returns the empty string.
  2. Add a topology.WithURI option that takes the raw non-parsed URI as a string. This allows the topology to figure out if an SRV URI was used and perform SRV polling if necessary.


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

Author:

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

Message: GODRIVER-1507 Correctly pass URI to topology (#320)
Branch: release/1.3
https://github.com/mongodb/mongo-go-driver/commit/fc02e689c8a065c70cbb413cd00f5f5e39cbc5d1

Comment by Githook User [ 03/Mar/20 ]

Author:

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

Message: GODRIVER-1507 Correctly pass URI to topology (#320)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/289a6c4bdbc9a022736a13685e8115b2104b42a4

Comment by Divjot Arora (Inactive) [ 02/Mar/20 ]

https://github.com/mongodb/mongo-go-driver/pull/320

Comment by Divjot Arora (Inactive) [ 02/Mar/20 ]

https://github.com/mongodb/mongo-go-driver/pull/319

Comment by Ryan Chipman [ 02/Mar/20 ]

SGTM. Thank you!

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