[GODRIVER-1108] Operation.addReadConcern encodes "empty" ReadConcern Created: 04/Jun/19 Updated: 28/Oct/23 Resolved: 14/Jun/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Core API |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Daniels (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: |
|
||||
| Description |
|
ReadConcern is rarely nil and is instead usually a zero valued struct when created by a default client. The old code for addReadConcern used to check if the encoded result had a length of non-zero before adding it to the document. This check is gone and an empty document is encoded. This same check could be added back or a different check can be done to optimize performance where we don't need to marshal. |
| Comments |
| Comment by Githook User [ 14/Jun/19 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: Do not encode empty read concern for operations. Change-Id: I8d7ce7b4e730903c0095ab76c332c81a989b4ad6 |
| Comment by Divjot Arora (Inactive) [ 07/Jun/19 ] |
|
CR: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/457314 |