Skip to content

Commit 46b2271

Browse files
authored
fix(distributor): Disable metadata topic writes (#17437)
1 parent 1df66cc commit 46b2271

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎pkg/distributor/distributor.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ func (d *Distributor) sendStreamToKafka(ctx context.Context, stream KeyedStream,
12691269

12701270
entriesSize, structuredMetadataSize := calculateStreamSizes(stream.Stream)
12711271

1272-
if _, ok := skipMetadataHashes[stream.HashKeyNoShard]; !ok {
1272+
if _, ok := skipMetadataHashes[stream.HashKeyNoShard]; !ok && d.cfg.IngestLimitsEnabled {
12731273
// However, unlike stream records, the distributor writes stream metadata
12741274
// records to one of a fixed number of partitions, the size of which is
12751275
// determined ahead of time. It does not use a ring. The reason for this

‎pkg/distributor/distributor_test.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,9 +2645,7 @@ func TestDistributor_SkipMetadataHashes(t *testing.T) {
26452645
}},
26462646
}},
26472647
},
2648-
// For now, metadata records are still written when
2649-
// limits are disabled in distributors.
2650-
expectedMetadataRecords: 1,
2648+
expectedMetadataRecords: 0,
26512649
}, {
26522650
name: "limits are enabled",
26532651
ingestLimitsEnabled: true,

0 commit comments

Comments
 (0)