[GODRIVER-1215] lastWriteDate is parsed from isMaster incorrectly Created: 02/Aug/19 Updated: 28/Oct/23 Resolved: 12/Aug/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Server Discovery and Monitoring |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Bartley | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
Per https://docs.mongodb.com/manual/reference/command/isMaster/#isMaster.lastWrite, lastWriteDate is contained in a sub-field of lastWrite, but the go driver attempts to parse lastWriteDate as if it were a top-level field. This bug exists in 3 places (seems like a separate issue that this logic is duplicated 3 times):
Separately, it appears opTime in the lastWrite sub-document is also not parsed, despite "server-discovery-and-monitoring.rst" suggesting they should be parsed out (and presumably made available to clients). |
| Comments |
| Comment by Githook User [ 12/Aug/19 ] |
|
Author: {'name': 'iwysiu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}Message: Change-Id: If1f5b0b7fb7561dda8cfaf0dd4fd88ae18f2d60b |
| Comment by Isabella Siu (Inactive) [ 07/Aug/19 ] |
|
code review url: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/464416 |
| Comment by David Bartley [ 02/Aug/19 ] |
|
This value feeds into maxStalenessSeconds for read preference (in selectSecondaries), so I imagine that can't be working correctly either. |