Skip to content

Commit

Permalink
fixup! log props
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Nov 28, 2018
1 parent 0ad7512 commit 2eb4f12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/storage/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (r *Replica) maybeDelaySplitToAvoidSnapshot(ctx context.Context) string {
if raftStatus == nil {
// Don't delay followers artificially. This case is hit rarely
// enough to not matter.
log.Infof(ctx, "no raft status")
break
}

Expand All @@ -288,6 +289,7 @@ func (r *Replica) maybeDelaySplitToAvoidSnapshot(ctx context.Context) string {
}

if !pr.RecentActive {
log.Infof(ctx, "r%d/%d inactive", r.RangeID, replicaID)
continue
}

Expand All @@ -305,7 +307,8 @@ func (r *Replica) maybeDelaySplitToAvoidSnapshot(ctx context.Context) string {
// up.
r.raftMu.Lock()
r.withRaftGroup(true /* campaignOnWake */, func(rawNode *raft.RawNode) (bool, error) {
_ = rawNode.Propose(encodeRaftCommandV1(makeIDKey(), nil))
err := rawNode.Propose(encodeRaftCommandV1(makeIDKey(), nil))
log.Infof(ctx, "proposed empty command: %v", err)
return false, nil
})
r.raftMu.Unlock()
Expand Down

0 comments on commit 2eb4f12

Please sign in to comment.