[GODRIVER-1549] Handle empty tag sets in read preference Created: 01/Apr/20  Updated: 28/Oct/23  Resolved: 03/Apr/20

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

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


 Description   

https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#tag_sets says that an empty tag set ([{}]) should match all candidate servers because the empty list is a subset of every list. The driver code doesn't handle this case and would only match servers that explicitly have an empty tag in their tag set.

We should also consider adding a spec test for this.



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

Author:

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

Message: GODRIVER-1549 Select all servers when an empty tag set is given (#352)
Branch: release/1.3
https://github.com/mongodb/mongo-go-driver/commit/6bb0f152e6d94f068fe3d5a44a99ebb6ac0f28ad

Comment by Githook User [ 03/Apr/20 ]

Author:

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

Message: GODRIVER-1549 Select all servers when an empty tag set is given (#352)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/4d93396f846e8c48fa04c2ed1a80e0fff21d6fc5

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

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

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