further bootstrap/startup optimization for reading 'format.json' (#18868)

- Move RenameFile to websockets
- Move ReadAll that is primarily is used
  for reading 'format.json' to to websockets
- Optimize DiskInfo calls, and provide a way
  to make a NoOp DiskInfo call.
This commit is contained in:
Harshavardhana
2024-01-25 12:45:46 -08:00
committed by GitHub
parent e377bb949a
commit 74851834c0
22 changed files with 998 additions and 111 deletions

View File

@@ -65,7 +65,7 @@ type StorageAPI interface {
// returns 'nil' once healing is complete or if the disk
// has never been replaced.
Healing() *healingTracker
DiskInfo(ctx context.Context, metrics bool) (info DiskInfo, err error)
DiskInfo(ctx context.Context, opts DiskInfoOptions) (info DiskInfo, err error)
NSScanner(ctx context.Context, cache dataUsageCache, updates chan<- dataUsageEntry, scanMode madmin.HealScanMode, shouldSleep func() bool) (dataUsageCache, error)
// Volume operations.
@@ -173,7 +173,7 @@ func (p *unrecognizedDisk) GetDiskID() (string, error) {
func (p *unrecognizedDisk) SetDiskID(id string) {
}
func (p *unrecognizedDisk) DiskInfo(ctx context.Context, _ bool) (info DiskInfo, err error) {
func (p *unrecognizedDisk) DiskInfo(ctx context.Context, _ DiskInfoOptions) (info DiskInfo, err error) {
return info, errDiskNotFound
}