From 4ce86ff5fad134cae7ffbea393a8cd4a96117fd9 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 9 Apr 2022 22:19:44 -0700 Subject: [PATCH] align atomic variables once more for 32bit (#14721) --- cmd/iam.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/iam.go b/cmd/iam.go index a30e2dfb9..07f6fb607 100644 --- a/cmd/iam.go +++ b/cmd/iam.go @@ -65,6 +65,13 @@ const ( // IAMSys - config system. type IAMSys struct { + // Need to keep them here to keep alignment - ref: https://golang.org/pkg/sync/atomic/#pkg-note-BUG + // metrics + LastRefreshTimeUnixNano uint64 + LastRefreshDurationMilliseconds uint64 + TotalRefreshSuccesses uint64 + TotalRefreshFailures uint64 + sync.Mutex iamRefreshInterval time.Duration @@ -78,12 +85,6 @@ type IAMSys struct { // configLoaded will be closed and remain so after first load. configLoaded chan struct{} - - // metrics - LastRefreshTimeUnixNano uint64 - LastRefreshDurationMilliseconds uint64 - TotalRefreshSuccesses uint64 - TotalRefreshFailures uint64 } // IAMUserType represents a user type inside MinIO server