forwarded 1107327 https://github.com/VictoriaMetrics/VictoriaMetrics/pull/8949
tags 1107327 patch
thanks
I'm attaching (in quilt format) the patch that they applied to make the tests
pass.
(They made a different issue to fix the underlying problem, but it will
be in the next upstream release, which will be too late for trixie).
Thanks.
From: Artem Fetishev <r...@victoriametrics.com>
Subject: lib/storage: make the test pass on systems with 1 CPU (#8949)
Origin: https://github.com/VictoriaMetrics/VictoriaMetrics/commit/5c9e90512003ae2c65a3197ae1c0b00d0a367c94
Bug-Debian: https://bugs.debian.org/1107327
--- a/lib/storage/storage_test.go
+++ b/lib/storage/storage_test.go
@@ -6,6 +6,7 @@
"os"
"path/filepath"
"reflect"
+ "runtime"
"slices"
"sort"
"sync"
@@ -2520,7 +2521,15 @@
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{