diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-05-13 13:37:02 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-05-15 10:09:11 +0300 |
commit | 84a35e294cdb8e092844c929bdf10643454f50fb (patch) | |
tree | d1647b91fd212b0c3ba987acec394d0b173c1287 | |
parent | ee6806382d1261e1bc742511b3a701bdf6632e33 (diff) |
transaction: Add "node" field when logging committed transactions
The log message in case a transaction is committed is missing the "node"
field right now. In case we ever decide we want to enable transactions
in case a quorum was reached, then a subset of nodes will commit the
transaction while another subset will abort it. Thus, having the "node"
field logged in such a case may help quite a lot to see what's going on.
-rw-r--r-- | internal/praefect/transactions/manager.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/praefect/transactions/manager.go b/internal/praefect/transactions/manager.go index d0a5a11df..5a3191287 100644 --- a/internal/praefect/transactions/manager.go +++ b/internal/praefect/transactions/manager.go @@ -123,6 +123,7 @@ func (mgr *Manager) StartTransaction(ctx context.Context, transactionID uint64, mgr.log(ctx).WithFields(logrus.Fields{ "transaction_id": transactionID, + "node": node, "hash": hex.EncodeToString(hash), }).Debug("StartTransaction: transaction committed") |