[GODRIVER-505] Client Options should be last one wins Created: 20/Jul/18  Updated: 28/Oct/23  Resolved: 02/Nov/18

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

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


 Description   

Client options should be last options wins, but this only happens if the original connection string does not contain that option. If the original connection string does contain an option, for instance AuthSource, then no options can overwrite that option, which is not the desired behavior.

Update the clientopt package and the clientopt.Bundle.Unbundle method to ensure that the last option wins and that options overwrite the original connection string parameters.



 Comments   
Comment by Githook User [ 02/Nov/18 ]

Author:

{'name': 'Matthew Chiaravalloti', 'email': 'matthew.chiaravalloti@mongodb.com', 'username': 'mattChiaravalloti'}

Message: Implement improved Go Driver CRUD API

GODRIVER-586
GODRIVER-505
GODRIVER-349

Co-authored-by: Matthew Chiaravalloti <matthew.chiaravalloti@mongodb.com>
Change-Id: I6008752862ae100ec9bce052a1c28b3ac8c29eeb
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/fe44874d3fd048a2ff49ac6348e13d9c93adb8c1

Comment by Divjot Arora (Inactive) [ 24/Oct/18 ]

Yes, the CRUD work fixes this.

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