diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index 25d3a94b6a..5d4da5dea9 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -1707,6 +1707,7 @@ func (s *shards) updateMetrics(_ context.Context, err error, sampleCount, exempl s.qm.logger.Error("non-recoverable error", "failedSampleCount", sampleDiff, "failedHistogramCount", histogramDiff, "failedExemplarCount", exemplarDiff, "err", err) } else if sampleDiff+exemplarDiff+histogramDiff > 0 { s.qm.logger.Error("we got 2xx status code from the Receiver yet statistics indicate some data was not written; investigation needed", "failedSampleCount", sampleDiff, "failedHistogramCount", histogramDiff, "failedExemplarCount", exemplarDiff) + panic("why only V2 TestSendSamplesWithBackoffWithSampleAgeLimit touches this path?") } // These counters are used to calculate the dynamic sharding, and as such diff --git a/storage/remote/queue_manager_test.go b/storage/remote/queue_manager_test.go index ce9cc6f1b6..25c4632c2b 100644 --- a/storage/remote/queue_manager_test.go +++ b/storage/remote/queue_manager_test.go @@ -1495,7 +1495,8 @@ func BenchmarkStoreSeries(b *testing.B) { mcfg := config.DefaultMetadataConfig metrics := newQueueManagerMetrics(nil, "", "") - m := NewQueueManager(metrics, nil, nil, nil, dir, newEWMARate(ewmaWeight, shardUpdateDuration), cfg, mcfg, labels.EmptyLabels(), nil, c, defaultFlushDeadline, newPool(), newHighestTimestampMetric(), nil, false, false, false, remoteapi.WriteV1MessageType) + // DEBUG https://github.com/prometheus/prometheus/issues/17659 + m := NewQueueManager(metrics, nil, nil, promslog.New(&promslog.Config{}), dir, newEWMARate(ewmaWeight, shardUpdateDuration), cfg, mcfg, labels.EmptyLabels(), nil, c, defaultFlushDeadline, newPool(), newHighestTimestampMetric(), nil, false, false, false, remoteapi.WriteV1MessageType) m.externalLabels = tc.externalLabels m.relabelConfigs = tc.relabelConfigs @@ -2039,7 +2040,7 @@ func TestIsSampleOld(t *testing.T) { // Simulates scenario in which remote write endpoint is down and a subset of samples is dropped due to age limit while backoffing. func TestSendSamplesWithBackoffWithSampleAgeLimit(t *testing.T) { t.Parallel() - for _, protoMsg := range []remoteapi.WriteMessageType{remoteapi.WriteV1MessageType, remoteapi.WriteV2MessageType} { + for _, protoMsg := range []remoteapi.WriteMessageType{remoteapi.WriteV1MessageType} { t.Run(fmt.Sprint(protoMsg), func(t *testing.T) { maxSamplesPerSend := 10 sampleAgeLimit := time.Second * 2