Skip to content

Commit

Permalink
kvserver: add a few Raft proposal trace events
Browse files Browse the repository at this point in the history
Epic: none
Release note: None
  • Loading branch information
erikgrinaker committed May 28, 2023
1 parent dd8dbfc commit 60b26ae
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 @@ -270,6 +270,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, quotaSize)
if err != nil {
Expand Down Expand Up @@ -504,6 +505,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 60b26ae

Please sign in to comment.