From 8b0c4b28a664718c543e4e38bbb4912852ef8c39 Mon Sep 17 00:00:00 2001 From: Baha Aiman Date: Tue, 7 Jan 2025 21:11:45 +0000 Subject: [PATCH] fix(bigtable): Retry correct mutations --- bigtable/bigtable.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bigtable/bigtable.go b/bigtable/bigtable.go index 0748672a597e..94e21f4b6994 100644 --- a/bigtable/bigtable.go +++ b/bigtable/bigtable.go @@ -1360,12 +1360,12 @@ func (t *Table) doApplyBulk(ctx context.Context, entryErrs []*entryErr, headerMD return err } - for i, entry := range res.Entries { + for _, entry := range res.Entries { s := entry.Status if s.Code == int32(codes.OK) { - entryErrs[i].Err = nil + entryErrs[entry.Index].Err = nil } else { - entryErrs[i].Err = status.Errorf(codes.Code(s.Code), s.Message) + entryErrs[entry.Index].Err = status.Errorf(codes.Code(s.Code), s.Message) } } after(res)