Skip to content

Commit

Permalink
roachpb: clone Transaction in Error.UpdateTxn
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nvanbenschoten committed Jun 25, 2019
1 parent 85827be commit a0a6db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/roachpb/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a0a6db3

Please sign in to comment.