fix: intrument os.OpenFile differently for Reads and Writes (#15449)

allows us to trace latency for READs or WRITEs
This commit is contained in:
Harshavardhana
2022-08-01 13:22:43 -07:00
committed by GitHub
parent aad9cb208a
commit 043aaa792d
8 changed files with 43 additions and 36 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ func (d *dataUpdateTracker) load(ctx context.Context, drives ...string) {
for _, drive := range drives {
cacheFormatPath := pathJoin(drive, dataUpdateTrackerFilename)
f, err := os.Open(cacheFormatPath)
f, err := OpenFile(cacheFormatPath, readMode, 0o666)
if err != nil {
if osIsNotExist(err) {
continue