app/vmagent: add -remoteWrite.removeDanglingQueues flag (#4017)

* app/vmagent: add `-remoteWrite.removeDanglingQueues` flag which allows to automatically remove dangling persistent queue contents

Related issue: #4014

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vmagent: address review feedback

- remove persistent queues files by default
- rename `remoteWrite.removeDanglingQueues` to `remoteWrite.keepDanglingQueues`
- update docs to reflect changed behaviour

Related issue: #4014

* Apply suggestions from code review

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
This commit is contained in:
Zakhar Bessarab
2023-03-28 04:15:28 +03:00
committed by GitHub
parent 9b1e002287
commit f3a51e8b1d
5 changed files with 48 additions and 2 deletions

View File

@@ -199,3 +199,8 @@ func (fq *FastQueue) MustReadBlock(dst []byte) ([]byte, bool) {
fq.cond.Wait()
}
}
// Dir returns the directory for persistent queue.
func (fq *FastQueue) Dir() string {
return fq.pq.dir
}