[GODRIVER-2236] Atomic alignment of connectionstate in topology.Server Created: 17/Nov/21 Updated: 28/Oct/23 Resolved: 23/Nov/21 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benji Rewis (Inactive) | Assignee: | Matt Dale |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
We recently merged a community PR to fix alignment of atomically-accessed integers. In particular, atomically-accessed integers should be of type Int64 and should be at the top of the struct that houses them. It's been pointed out that topology.Server.connectionstate is an atomically-accessed integer that, while of type Int64, is not at the top of the topology.Server struct. We should move it to the top and note the relevant atomic bug in documentation. |
| Comments |
| Comment by Githook User [ 23/Nov/21 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 17/Nov/21 ] |
|
PR with fix and added linter checks to prevent it happening again: https://github.com/mongodb/mongo-go-driver/pull/810 |