From 3ddae77c63ce4c201d03164c9b2c699176059381 Mon Sep 17 00:00:00 2001 From: pludov <14250654+pludov@users.noreply.github.com> Date: Tue, 4 Jun 2024 15:17:38 +0200 Subject: [PATCH 1/2] lib/fs: support NFS implementations that return EEXIST instead of ENOTEMPTY (#6398) ### Describe Your Changes Fix for issue #6396: according to rmdir manpage, ENOTEMPTY and EEXIST should be treated equally https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6396 ### Checklist The following checks are **mandatory**: - [x ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Co-authored-by: Ludovic Pollet Co-authored-by: hagen1778 --- docs/CHANGELOG.md | 1 + lib/fs/dir_remover.go | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 71f97cf8e..32f71e96f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -76,6 +76,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): filter deleted label names and values from [`/api/v1/labels`](https://docs.victoriametrics.com/url-examples/#apiv1labels) and [`/api/v1/label/.../values`](https://docs.victoriametrics.com/url-examples/#apiv1labelvalues) responses when `match[]` filter matches small number of time series. The issue was introduced [v1.81.0](https://docs.victoriametrics.com/changelog_2022/#v1810). * BUGFIX: [vmalert-tool](https://docs.victoriametrics.com/vmalert-tool/): fix float values template in `input_series`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6391). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert/): fix misleading error logs in vmalert's stdout when unsupported HTTP path is requested. +* BUGFIX: retry files delete attempts on vXFS file system for `EEXIST` error type. See the [related issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6396). Thanks to @pludov for the [pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6398). * DEPRECATION: [vmagent](https://docs.victoriametrics.com/vmagent/): removed deprecated `-remoteWrite.multitenantURL` flag from vmagent. This flag was deprecated since [v1.96.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.96.0). Use `-enableMultitenantHandlers` instead, as it is easier to use and combine with [multitenant URL at vminsert](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multitenancy-via-labels). See these [docs for details](https://docs.victoriametrics.com/vmagent.html#multitenancy). diff --git a/lib/fs/dir_remover.go b/lib/fs/dir_remover.go index 79b3e429d..779362624 100644 --- a/lib/fs/dir_remover.go +++ b/lib/fs/dir_remover.go @@ -74,9 +74,12 @@ func isStaleNFSFileHandleError(err error) bool { } func isTemporaryNFSError(err error) bool { - // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/61 for details. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/61 + // and https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6396 for details. errStr := err.Error() - return strings.Contains(errStr, "directory not empty") || strings.Contains(errStr, "device or resource busy") + return strings.Contains(errStr, "directory not empty") || + strings.Contains(errStr, "device or resource busy") || + strings.Contains(errStr, "file exists") } // MustStopDirRemover must be called in the end of graceful shutdown From f497d3c2223b1271e0591e9294191d9c9fed69ec Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 4 Jun 2024 15:52:33 +0200 Subject: [PATCH 2/2] docs: add technical articles by @jiekun Signed-off-by: hagen1778 --- docs/Articles.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Articles.md b/docs/Articles.md index 0ca1c1ded..43148af27 100644 --- a/docs/Articles.md +++ b/docs/Articles.md @@ -86,6 +86,8 @@ See also [case studies](https://docs.victoriametrics.com/casestudies/). * [Observe and record performance of Spark jobs with Victoria Metrics](https://medium.com/constructor-engineering/observe-and-record-performance-of-databricks-jobs-11ffe236555e) * [Supercharge your Monitoring: Migrate from Prometheus to VictoriaMetrics for Scalability and Speed - Part 1](https://zetablogs.medium.com/supercharge-your-monitoring-migrate-from-prometheus-to-victoriametrics-for-scalability-and-speed-e1e9df786145) * [Supercharge your Monitoring: Migrate from Prometheus to VictoriaMetrics for optimized CPU and Memory usage - Part 2](https://zetablogs.medium.com/part-2-supercharge-your-monitoring-migrate-from-prometheus-to-victoriametrics-for-optimised-cpu-9a90c015ccba) +* [Persistent Data Structures in VictoriaMetrics (Part 1): vmagent](https://medium.com/devops-dev/persistent-data-structures-in-victoriametrics-part-1-vmagent-2e9c7681a6f0) +* [Persistent Data Structures in VictoriaMetrics (Part 2): vmselect](https://medium.com/@jiekun/persistent-data-structures-in-victoriametrics-part-2-vmselect-9e3de39a4d20) ## Our articles