prometheus/tsdb/tsdbutil
Robert Fratto 72a9f7fee9
Share TSDB locker code with agent (#9623)
* share tsdb db locker code with agent

Closes #9616

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* add flag to disable lockfile for agent

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* use agentOnlySetting instead of PreAction

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb: address review feedback

1. Rename Locker to DirLocker
2. Move DirLocker to tsdb/tsdbutil
3. Name metric using fmt.Sprintf
4. Refine error checking in DirLocker test

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb: create test utilities to assert expected DirLocker behavior

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb/tsdbutil: fix lint errors

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb/agent: fix windows test failure

Use new DB variable instead of overriding the old one.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2021-11-11 11:45:25 -05:00
..
buffer.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
buffer_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
chunks.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
dir_locker.go Share TSDB locker code with agent (#9623) 2021-11-11 11:45:25 -05:00
dir_locker_test.go Share TSDB locker code with agent (#9623) 2021-11-11 11:45:25 -05:00
dir_locker_testutil.go Share TSDB locker code with agent (#9623) 2021-11-11 11:45:25 -05:00