minio/internal/config
Klaus Post 74253e1ddc
Fix BackendInfo() race (#18305)
`GetParityForSC` has a value receiver, so Config is copied before the lock is obtained.

Make it pointer receiver.

Fixes:

```
WARNING: DATA RACE
Read at 0x0000079cdd10 by goroutine 190:
  github.com/minio/minio/cmd.(*erasureServerPools).BackendInfo()
      github.com/minio/minio/cmd/erasure-server-pool.go:579 +0x6f
  github.com/minio/minio/cmd.(*erasureServerPools).LocalStorageInfo()
      github.com/minio/minio/cmd/erasure-server-pool.go:614 +0x3c6
  github.com/minio/minio/cmd.(*peerRESTServer).LocalStorageInfoHandler()
      github.com/minio/minio/cmd/peer-rest-server.go:347 +0x4ea
  github.com/minio/minio/cmd.(*peerRESTServer).LocalStorageInfoHandler-fm()
...

WARNING: DATA RACE
Read at 0x0000079cdd10 by goroutine 190:
  github.com/minio/minio/cmd.(*erasureServerPools).BackendInfo()
      github.com/minio/minio/cmd/erasure-server-pool.go:579 +0x6f
  github.com/minio/minio/cmd.(*erasureServerPools).LocalStorageInfo()
      github.com/minio/minio/cmd/erasure-server-pool.go:614 +0x3c6
  github.com/minio/minio/cmd.(*peerRESTServer).LocalStorageInfoHandler()
      github.com/minio/minio/cmd/peer-rest-server.go:347 +0x4ea
  github.com/minio/minio/cmd.(*peerRESTServer).LocalStorageInfoHandler-fm()
```
2023-10-24 08:15:41 -07:00
..
api Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
callhome Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
compress Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
dns cleanup ignored static analysis (#16767) 2023-03-06 08:56:10 -08:00
etcd Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
heal heal: calculate the number of workers based on NRRequests (#17945) 2023-09-11 14:48:54 -07:00
identity Fix policy package import name (#18031) 2023-09-14 14:50:16 -07:00
lambda Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
notify Send kafka notification messages in batches when queue_dir is enabled (#18164) 2023-10-07 08:07:38 -07:00
policy Fix policy package import name (#18031) 2023-09-14 14:50:16 -07:00
scanner apply healing per object at 1024 cycles (#18050) 2023-09-19 09:24:22 -07:00
storageclass Fix BackendInfo() race (#18305) 2023-10-24 08:15:41 -07:00
subnet Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
bool-flag.go heal: Enable periodic bitrot scan configuration (#14464) 2022-04-07 08:10:40 -07:00
bool-flag_test.go rename all remaining packages to internal/ (#12418) 2021-06-01 14:59:40 -07:00
certs.go Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
certs_test.go Remove deprecated io/ioutil (#15707) 2022-09-19 11:05:16 -07:00
certsinfo.go add gocritic/ruleguard checks back again, cleanup code. (#13665) 2021-11-16 09:28:29 -08:00
config.go Update to minio/pkg/v2 (#17967) 2023-09-04 12:57:37 -07:00
config_test.go fix: cleanup config KV parsing using madmin helpers (#15552) 2022-08-18 15:55:17 -07:00
constants.go Added MINIO_PROMETHEUS_AUTH_TOKEN env support (#18028) 2023-09-14 17:28:21 -07:00
crypto.go cleanup ignored static analysis (#16767) 2023-03-06 08:56:10 -08:00
crypto_test.go Remove deprecated io/ioutil (#15707) 2022-09-19 11:05:16 -07:00
errors-utils.go cleanup ignored static analysis (#16767) 2023-03-06 08:56:10 -08:00
errors.go completely remove drive caching layer from gateway days (#18217) 2023-10-11 21:18:17 -07:00
help.go Redact all secrets from config viewing APIs (#17380) 2023-06-23 07:45:27 -07:00
legacy.go Do not save credentials in config.json (#16275) 2022-12-19 12:27:06 -08:00