From a0a6db3bed593f0a48f14469c48cdfcb0330b42a Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Sat, 8 Jun 2019 16:41:41 -0400 Subject: [PATCH] roachpb: clone Transaction in Error.UpdateTxn I'm not aware of this causing issues, but we're pretty careful with this in other places (like BatchResponse_Header.combine) to avoid issues like what we saw in #34241, so this seems like a good change. Release note: None --- pkg/roachpb/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/roachpb/errors.go b/pkg/roachpb/errors.go index e03f86ff300b..0b19df824e9c 100644 --- a/pkg/roachpb/errors.go +++ b/pkg/roachpb/errors.go @@ -191,7 +191,7 @@ func (e *Error) UpdateTxn(o *Transaction) { return } if e.UnexposedTxn == nil { - e.UnexposedTxn = o + e.UnexposedTxn = o.Clone() } else { e.UnexposedTxn.Update(o) }