mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
protect tracker copy properly to avoid race (#18984)
``` WARNING: DATA RACE Write at 0x00c000aac1e0 by goroutine 1133: github.com/minio/minio/cmd.(*healingTracker).updateProgress() github.com/minio/minio/cmd/background-newdisks-heal-ops.go:183 +0x117 github.com/minio/minio/cmd.(*erasureObjects).healErasureSet.func5() github.com/minio/minio/cmd/global-heal.go:292 +0x1d3 Previous read at 0x00c000aac1e0 by goroutine 1003: github.com/minio/minio/cmd.(*allHealState).updateHealStatus() github.com/minio/minio/cmd/admin-heal-ops.go:136 +0xcb github.com/minio/minio/cmd.(*healingTracker).save() github.com/minio/minio/cmd/background-newdisks-heal-ops.go:223 +0x424 ```
This commit is contained in:
parent
f674168b8b
commit
630963fa6b
2
.github/workflows/multipart/migrate.sh
vendored
2
.github/workflows/multipart/migrate.sh
vendored
@ -26,7 +26,7 @@ fi
|
||||
|
||||
(
|
||||
cd /tmp
|
||||
go install github.com/minio/minio/docs/debugging/s3-check-md5@latest
|
||||
go install github.com/minio/minio/docs/debugging/s3-check-md5@master
|
||||
)
|
||||
|
||||
export RELEASE=RELEASE.2023-08-29T23-07-35Z
|
||||
|
@ -87,7 +87,7 @@ function verify_rewrite() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go install github.com/minio/minio/docs/debugging/s3-check-md5@latest
|
||||
go install github.com/minio/minio/docs/debugging/s3-check-md5@master
|
||||
if ! s3-check-md5 \
|
||||
-debug \
|
||||
-versions \
|
||||
|
@ -133,7 +133,13 @@ func (ahs *allHealState) popHealLocalDisks(healLocalDisks ...Endpoint) {
|
||||
func (ahs *allHealState) updateHealStatus(tracker *healingTracker) {
|
||||
ahs.Lock()
|
||||
defer ahs.Unlock()
|
||||
ahs.healStatus[tracker.ID] = *tracker
|
||||
|
||||
tracker.mu.RLock()
|
||||
t := *tracker
|
||||
t.QueuedBuckets = append(make([]string, 0, len(tracker.QueuedBuckets)), tracker.QueuedBuckets...)
|
||||
t.HealedBuckets = append(make([]string, 0, len(tracker.HealedBuckets)), tracker.HealedBuckets...)
|
||||
ahs.healStatus[tracker.ID] = t
|
||||
tracker.mu.RUnlock()
|
||||
}
|
||||
|
||||
// Sort by zone, set and disk index
|
||||
|
Loading…
Reference in New Issue
Block a user