[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:
Related
related to GODRIVER-2157 Detect bit alignment issues when usin... Closed

 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: GODRIVER-2236 Fix atomic op alignment and run linters on multiple architectures. (#810)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/399ea1efe905d9902db11155730568c70e461352

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

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