From 21e83660515e7831f4081b6b98f53f9fd43560f3 Mon Sep 17 00:00:00 2001 From: Alan Protasio Date: Thu, 22 Jun 2023 20:20:25 -0700 Subject: [PATCH] Release 1.15 (#5423) * Do not reuse remote write requests in case of error (#5422) * Do not reuse remote write requests in case of error Signed-off-by: Alan Protasio * Changelog Signed-off-by: Alan Protasio --------- Signed-off-by: Alan Protasio * Release and bump version to 1.15.3 Signed-off-by: Alan Protasio * Fix Changelog Signed-off-by: Alan Protasio --------- Signed-off-by: Alan Protasio --- CHANGELOG.md | 4 ++++ VERSION | 2 +- pkg/distributor/distributor.go | 7 ++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 455e13ce5b..685fb6ec24 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 42cf0675c5..f2380cc7ae 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 92698d5009..abdb382db8 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()