Skip to content

Commit

Permalink
kv: improve HandleWriterIntentError assertion string
Browse files Browse the repository at this point in the history
Should help track down cockroachdb#53540.
  • Loading branch information
nvanbenschoten committed Sep 2, 2020
1 parent 410616f commit 66fff25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/concurrency/concurrency_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66fff25

Please sign in to comment.