Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure updateMetaDataMs is 64-bit aligned #2356

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ const (
)

type client struct {
// updateMetaDataMs stores the time at which metadata was lasted updated.
// Note: this accessed atomically so must be the first word in the struct
// as per golang/go#41970
updateMetaDataMs int64

conf *Config
closer, closed chan none // for shutting down background metadata updater

Expand All @@ -150,7 +155,6 @@ type client struct {

lock sync.RWMutex // protects access to the maps that hold cluster state.

updateMetaDataMs int64 // store update metadata time
}

// NewClient creates a new Client. It connects to one of the given broker addresses
Expand Down