Skip to content

Commit

Permalink
Merge pull request #104071 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-104025

release-23.1: kvserver: add a few Raft proposal trace events
  • Loading branch information
erikgrinaker authored Jun 6, 2023
2 parents 19db4ce + 2cbd96d commit 28529f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/replica_proposal_buf.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ func (b *propBuf) FlushLockedWithRaftGroup(
ents = append(ents, raftpb.Entry{
Data: p.encodedCommand,
})
log.VEvent(p.ctx, 2, "flushing proposal to Raft")
}
}
if firstErr != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/kv/kvserver/replica_raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func (r *Replica) evalAndPropose(
"command is too large: %d bytes (max: %d)", quotaSize, maxSize,
))
}
log.VEventf(proposal.ctx, 2, "acquiring proposal quota (%d bytes)", quotaSize)
var err error
proposal.quotaAlloc, err = r.maybeAcquireProposalQuota(ctx, ba, quotaSize)
if err != nil {
Expand Down Expand Up @@ -501,6 +502,7 @@ func (r *Replica) propose(
//
// NB: we must not hold r.mu while using the proposal buffer, see comment
// on the field.
log.VEvent(p.ctx, 2, "submitting proposal to proposal buffer")
err := r.mu.proposalBuf.Insert(ctx, p, tok.Move(ctx))
if err != nil {
return kvpb.NewError(err)
Expand Down

0 comments on commit 28529f2

Please sign in to comment.