[GODRIVER-2305] Empty readPreferenceTags Connection Failure Created: 10/Feb/22 Updated: 28/Oct/23 Resolved: 17/Feb/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | John Burke | Assignee: | Benji Rewis (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes: | Not Needed | ||||||||
| Description |
SummaryPer docs (https://docs.mongodb.com/manual/core/read-preference-tags), an empty tag can be used as a "fail-safe" mechanism to connect to any node regardless of tag: "To avoid an error if no members match any of the tag specifications, you can add an empty document {{{ }}} as the last element of the tag set to read from any eligible member." However, when using "readPreferenceTag=" as the last tag set in the connection URI the driver fails to send an empty document in the tag array. I found a commit (https://github.com/mongodb/mongo-go-driver/commit/bfd961abf162856d6dc7c6d97ec627c18e1ceed0) that seems to simply break instead of treating as an empty document. How to Reproduce
|
| Comments |
| Comment by Githook User [ 17/Feb/22 ] |
|
Author: {'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}Message: |
| Comment by Benji Rewis (Inactive) [ 17/Feb/22 ] |
|
This fix should be available in the next patch release of the Go driver, john08burke (1.8.4). |
| Comment by Githook User [ 17/Feb/22 ] |
|
Author: {'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}Message: |
| Comment by John Burke [ 16/Feb/22 ] |
|
Great, thanks for the quick fix! |
| Comment by Benji Rewis (Inactive) [ 16/Feb/22 ] |
|
Thanks again for your report, john08burke. Looks like this is a bug introduced by a previous "fix" |
| Comment by Benji Rewis (Inactive) [ 16/Feb/22 ] |
|
Thanks for your bug report, john08burke! We're taking a look now. |