You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(index-gateway): Improve instrumentation of index download/sync (#13194)
This PR contains changes to improve the instrumentation and obervability of the download/sync operations that happen on the index gateways (index shipper). This includes fixes to the download latency and wait time metrics.
Signed-off-by: Christian Haudum <[email protected]>
// if we fail to open an index file, lets skip it and let sync operation re-download the file from storage.
138
134
idx, err:=t.openIndexFileFunc(fullPath)
139
135
iferr!=nil {
140
-
level.Error(t.logger).Log("msg", fmt.Sprintf("failed to open existing index file %s, removing the file and continuing without it to let the sync operation catch up", fullPath), "err", err)
136
+
level.Error(logger).Log("msg", fmt.Sprintf("failed to open existing index file %s, removing the file and continuing without it to let the sync operation catch up", fullPath), "err", err)
141
137
// Sometimes files get corrupted when the process gets killed in the middle of a download operation which can cause problems in reading the file.
142
138
// Implementation of openIndexFileFunc should take care of gracefully handling corrupted files.
143
139
// Let us just remove the file and let the sync operation re-download it.
144
140
iferr:=os.Remove(fullPath); err!=nil {
145
-
level.Error(t.logger).Log("msg", fmt.Sprintf("failed to remove index file %s which failed to open", fullPath))
141
+
level.Error(logger).Log("msg", fmt.Sprintf("failed to remove index file %s which failed to open", fullPath))
0 commit comments