From 66fff25a0ed056824ab210d2f112bd57c3672957 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Wed, 2 Sep 2020 12:33:30 -0400 Subject: [PATCH] kv: improve HandleWriterIntentError assertion string Should help track down #53540. --- pkg/kv/kvserver/concurrency/concurrency_manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/concurrency/concurrency_manager.go b/pkg/kv/kvserver/concurrency/concurrency_manager.go index 2e5e53a8d5d4..2c221b1ad9c3 100644 --- a/pkg/kv/kvserver/concurrency/concurrency_manager.go +++ b/pkg/kv/kvserver/concurrency/concurrency_manager.go @@ -28,6 +28,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/util/metric" "github.com/cockroachdb/cockroach/pkg/util/stop" "github.com/cockroachdb/cockroach/pkg/util/uuid" + "github.com/cockroachdb/errors" ) // managerImpl implements the Manager interface. @@ -260,7 +261,9 @@ func (m *managerImpl) HandleWriterIntentError( intent := &t.Intents[i] added, err := m.lt.AddDiscoveredLock(intent, seq, g.ltg) if err != nil { - log.Fatalf(ctx, "%v", err) + reqBa := roachpb.BatchRequest{Requests: g.Req.Requests} + log.Fatalf(ctx, "assertion failed: %s; req=[%s], req_txn={%s}, intent_txn={%s}", + err, errors.Safe(reqBa.Summary()), g.Req.Txn, intent.Txn) } if !added { wait = true