mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
fallback to globalLocalDrives for non-distributed setups
This commit is contained in:
@@ -78,6 +78,13 @@ var (
|
||||
func getStorageViaEndpoint(endpoint Endpoint) StorageAPI {
|
||||
globalLocalDrivesMu.RLock()
|
||||
defer globalLocalDrivesMu.RUnlock()
|
||||
if len(globalLocalSetDrives) == 0 {
|
||||
for _, drive := range globalLocalDrives {
|
||||
if drive != nil && drive.Endpoint().Equal(endpoint) {
|
||||
return drive
|
||||
}
|
||||
}
|
||||
}
|
||||
return globalLocalSetDrives[endpoint.PoolIdx][endpoint.SetIdx][endpoint.DiskIdx]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user