From fcf13b0abad4f837d4f4f53fad6c55eba1a0fe56 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Wed, 18 Aug 2021 15:36:44 -0700 Subject: [PATCH] fix(datastore): Initialize commit sentinel to avoid cross use of commits (#4599) --- datastore/transaction.go | 1 + 1 file changed, 1 insertion(+) diff --git a/datastore/transaction.go b/datastore/transaction.go index 08420f26ae6..f66209a254b 100644 --- a/datastore/transaction.go +++ b/datastore/transaction.go @@ -213,6 +213,7 @@ func (t *Transaction) Commit() (c *Commit, err error) { return nil, err } + c = &Commit{} // Copy any newly minted keys into the returned keys. for i, p := range t.pending { if i >= len(resp.MutationResults) || resp.MutationResults[i].Key == nil {