Skip to content

Commit

Permalink
more trying to avoid hangs on assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Feb 16, 2023
1 parent b15e30c commit 44a6e38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/kv/kvserver/replica_application_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package kvserver
import (
"context"
"math/rand"
"os"

"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverbase"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
Expand Down Expand Up @@ -133,7 +134,8 @@ func (r *Replica) prepareLocalResult(ctx context.Context, cmd *replicatedCmd) {
_, inMap := r.mu.proposals[cmd.ID]
if inMap {
// NB: intentionally still holding lock, or access to `cmd.proposal` is unsafe.
log.Fatalf(ctx, "failed reproposal unexpectedly in proposals map: %s", dumpCmdInfo(ctx, r.store.TODOEngine(), cmd))
log.Warningf(ctx, "failed reproposal unexpectedly in proposals map: %s", dumpCmdInfo(ctx, r.store.TODOEngine(), cmd))
os.Exit(123)
}
r.mu.RUnlock()
} else {
Expand Down

0 comments on commit 44a6e38

Please sign in to comment.