diff --git a/CHANGELOG.md b/CHANGELOG.md index 455e13ce5bb..685fb6ec24e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## master / unreleased +## 1.15.3 2023-06-22 + +* [BUGFIX] Distributor: Fix potential data corruption in cases of timeout between distributors and ingesters. #5422 + ## 1.15.2 2023-05-09 * [ENHANCEMENT] Update Go version to 1.20.4. #5299 diff --git a/VERSION b/VERSION index 42cf0675c56..f2380cc7aef 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.2 +1.15.3 diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 92698d5009e..abdb382db88 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -843,7 +843,12 @@ func (d *Distributor) send(ctx context.Context, ingester ring.InstanceDesc, time req.Source = source _, err = c.PushPreAlloc(ctx, req) - cortexpb.ReuseWriteRequest(req) + + // We should not reuse the req in case of errors: + // See: https://github.com/grpc/grpc-go/issues/6355 + if err == nil { + cortexpb.ReuseWriteRequest(req) + } if len(metadata) > 0 { d.ingesterAppends.WithLabelValues(ingester.Addr, typeMetadata).Inc()