prometheus/cmd/promtool
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
..
testdata Fix misspelled word in comment (#8348) 2021-01-07 10:01:08 +00:00
archive.go Make file permissions set to allow for wider umask options. (#7782) 2020-08-12 23:23:17 +02:00
backfill.go Backfilling: fast-path for non-consecutive blocks (#8324) 2020-12-30 02:06:41 +01:00
backfill_test.go Backfilling: fast-path for non-consecutive blocks (#8324) 2020-12-30 02:06:41 +01:00
debug.go collect cpu and trace profiles with the promtool debug command (#4897) 2018-11-23 17:57:31 +02:00
main.go backfill: move checkErr before we close the mmaped file 2021-02-01 21:18:42 +01:00
main_test.go promtool: Add URL scheme when not provided (#7956) 2020-12-23 19:52:04 +01:00
tsdb.go backfill: move checkErr before we close the mmaped file 2021-02-01 21:18:42 +01:00
unittest.go promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00
unittest_test.go promtool: Calculate mint and maxt per test (#8096) 2020-10-24 12:03:55 +01:00