mirror of
https://github.com/minio/minio.git
synced 2026-11-17 06:55:18 +00:00
fix: various optimizations, idiomatic changes (#9179)
- acquire since leader lock for all background operations - healing, crawling and applying lifecycle policies. - simplify lifecyle to avoid network calls, which was a bug in implementation - we should hold a leader and do everything from there, we have access to entire name space. - make listing, walking not interfere by slowing itself down like the crawler. - effectively use global context everywhere to ensure proper shutdown, in cache, lifecycle, healing - don't read `format.json` for prometheus metrics in StorageInfo() call.
This commit is contained in:
1 parent
ea18e51f4d
commit
cfc9cfd84a
18 files changed
+172
-369
No files matched your search
@@ -392,6 +392,11 @@ func (s *xlSets) StorageInfo(ctx context.Context, local bool) StorageInfo {
|
||||
storageInfo.Backend.Sets[i] = make([]madmin.DriveInfo, s.drivesPerSet)
|
||||
}
|
||||
|
||||
if local {
|
||||
// if local is true, we don't need to read format.json
|
||||
return storageInfo
|
||||
}
|
||||
|
||||
storageDisks, dErrs := initStorageDisksWithErrors(s.endpoints)
|
||||
defer closeStorageDisks(storageDisks)
|
||||
|
||||
|
||||
Reference in new issue
Block a user