fix: single node multi-drive must register local drives properly (#19832)

since #19688 there was a regression introduced during drive
lookups for single node multi-drive setups, drive replacement
would not work correctly without this PR.
This commit is contained in:
Harshavardhana 2024-05-29 13:12:44 -07:00 committed by GitHub
parent bd4eeb4522
commit 38d059b0ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,6 +165,9 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
if !globalIsDistErasure {
globalLocalDrivesMu.Lock()
globalLocalDrives = localDrives
for _, drive := range localDrives {
globalLocalDrivesMap[drive.Endpoint().String()] = drive
}
globalLocalDrivesMu.Unlock()
}