prometheus/cmd
Julien Pivotto 9334269f2b backfill: move checkErr before we close the mmaped file
When printing the error, we still need access to the mmapped byte array
of the file. Therefore, we make sure that we run it before closing the
file.

I could have done something more complex like a defer, or not closing
the file, knowing that we would exit the program anyway. However, I
think that in case we extend this in the future, or this is copy/paster
elsewhere, we should continue closing the file. As it is small enough, I
went for the solution to call the function 3 times instead of playing
with a defer.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-02-01 21:18:42 +01:00
..
prometheus Deprecate --alertmanager.timeout 2021-01-25 12:36:13 +01:00
promtool backfill: move checkErr before we close the mmaped file 2021-02-01 21:18:42 +01:00