use readConfig/saveConfig to simplify I/O on usage/tracker info (#14019)

This commit is contained in:
Harshavardhana
2022-01-03 10:22:58 -08:00
committed by GitHub
parent 9d91d32d82
commit 001b77e7e1
8 changed files with 30 additions and 51 deletions

View File

@@ -921,6 +921,7 @@ func (d *dataUsageCache) load(ctx context.Context, store objectIO, name string)
// Abandon if more than 5 minutes, so we don't hold up scanner.
ctx, cancel := context.WithTimeout(ctx, 5*time.Minute)
defer cancel()
r, err := store.GetObjectNInfo(ctx, dataUsageBucket, name, nil, http.Header{}, readLock, ObjectOptions{})
if err != nil {
switch err.(type) {