Bug#1108302: unblock: victoriametrics/1.112.0+ds1-2
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: victoriametrics@packages.debian.org, Santiago Vila <sanvila@debian.org>
Control: affects -1 + src:victoriametrics
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package victoriametrics.
[ Reason ]
This update fixes a FTBFS when the system has only one CPU.
[ Impact ]
FTBFS.
[ Tests ]
The upstream patch was tested by Santiago as making the build succeed
in the affected systems.
[ Risks ]
Low, this only changes the test suite. The package has not been able
to migrate on its own due to a non-regression autopkgtest failure on
armel.
[ Checklist ]
[√] all changes are documented in the d/changelog
[√] I reviewed all changes and I approve them
[√] attach debdiff against the package in testing
[ Other info ]
None.
unblock victoriametrics/1.112.0+ds1-2
Thanks,
Guillem
diff -Nru victoriametrics-1.112.0+ds1/debian/changelog victoriametrics-1.112.0+ds1/debian/changelog
--- victoriametrics-1.112.0+ds1/debian/changelog 2025-02-26 20:33:24.000000000 +0100
+++ victoriametrics-1.112.0+ds1/debian/changelog 2025-06-11 20:32:22.000000000 +0200
@@ -1,3 +1,9 @@
+victoriametrics (1.112.0+ds1-2) unstable; urgency=medium
+
+ * Fix FTBFS on systems with a single CPU. (Closes: #1107327)
+
+ -- Guillem Jover <gjover@sipwise.com> Wed, 11 Jun 2025 20:32:22 +0200
+
victoriametrics (1.112.0+ds1-1) unstable; urgency=medium
* New upstream release.
diff -Nru victoriametrics-1.112.0+ds1/debian/patches/0001-lib-storage-make-the-test-pass-on-systems-with-1-CPU.patch victoriametrics-1.112.0+ds1/debian/patches/0001-lib-storage-make-the-test-pass-on-systems-with-1-CPU.patch
--- victoriametrics-1.112.0+ds1/debian/patches/0001-lib-storage-make-the-test-pass-on-systems-with-1-CPU.patch 1970-01-01 01:00:00.000000000 +0100
+++ victoriametrics-1.112.0+ds1/debian/patches/0001-lib-storage-make-the-test-pass-on-systems-with-1-CPU.patch 2025-06-11 20:32:22.000000000 +0200
@@ -0,0 +1,64 @@
+From 1916f5be4b19efd51441798fb08af390ed11890e Mon Sep 17 00:00:00 2001
+From: Artem Fetishev <149964189+rtm0@users.noreply.github.com>
+Date: Fri, 16 May 2025 15:54:11 +0200
+Subject: [PATCH] lib/storage: make the test pass on systems with 1 CPU (#8949)
+
+The following test produces duplicate per-day index records on a system
+with 1 CPU even when data inserted sequentially:
+
+```
+GOEXPERIMENT=synctest taskset -c 0 go test ./lib/storage -run=TestStorageAddRowsForVariousDataPatternsConcurrently/perDayIndexes/serial/sameBatchMetrics/sameRowMetrics/sameBatchDates/diffRowDates
+```
+
+See: #8654
+
+Make this test pass by relaxing got and want data equality requirement
+if the number of CPUs is 1. This is temporary until one insertion corner
+case is fixed:
+https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8948
+
+### Describe Your Changes
+
+Please provide a brief description of the changes you made. Be as
+specific as possible to help others understand the purpose and impact of
+your modifications.
+
+### Checklist
+
+The following checks are **mandatory**:
+
+- [x] My change adheres to [VictoriaMetrics contributing
+guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/).
+
+Signed-off-by: Artem Fetishev <rtm@victoriametrics.com>
+---
+ lib/storage/storage_test.go | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/lib/storage/storage_test.go
++++ b/lib/storage/storage_test.go
+@@ -6,6 +6,7 @@ import (
+ "os"
+ "path/filepath"
+ "reflect"
++ "runtime"
+ "slices"
+ "sort"
+ "sync"
+@@ -2520,7 +2521,15 @@ func testStorageVariousDataPatterns(t *t
+ sameBatchDates: sameBatchDates,
+ sameRowDates: sameRowDates,
+ })
+- strict := concurrency == 1
++ // The TestStorageAddRowsForVariousDataPatternsConcurrently/perDayIndexes/serial/sameBatchMetrics/sameRowMetrics/sameBatchDates/diffRowDates
++ // test fails once the indexDB is rotated. This happens reliably when the number
++ // of CPUs is 1. See: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8654.
++ //
++ // With the higher number of CPUs this failure is very rare.
++ // Temporarily relax the strict equality requirement for got and want
++ // data until this fixed. It is known why the test is failing but the
++ // fix may be non-trivial, See: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/8948
++ strict := concurrency == 1 && runtime.NumCPU() > 1
+ rowsAddedTotal := wantCounts.metrics.RowsAddedTotal
+
+ s := MustOpenStorage(t.Name(), OpenOptions{
diff -Nru victoriametrics-1.112.0+ds1/debian/patches/series victoriametrics-1.112.0+ds1/debian/patches/series
--- victoriametrics-1.112.0+ds1/debian/patches/series 2025-02-26 20:33:07.000000000 +0100
+++ victoriametrics-1.112.0+ds1/debian/patches/series 2025-06-11 20:32:22.000000000 +0200
@@ -1,3 +1,7 @@
+# Upstream
+0001-lib-storage-make-the-test-pass-on-systems-with-1-CPU.patch
+# Local (not for submission)
Disable-vmui.patch
Fix-test-paths.patch
+# Local (to upstream)
Skip-memory-test-on-arm.patch
Reply to: