Skip to content

Commit

Permalink
chore(logs): add logs to track dropped proposals (#8012) (#8568)
Browse files Browse the repository at this point in the history
(cherry picked from commit db841de)

(cherry picked from commit 989c9db)

Co-authored-by: Naman Jain <[email protected]>
  • Loading branch information
all-seeing-code and NamanJain8 authored Jan 4, 2023
1 parent 25cf4f2 commit 8c72479
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions worker/draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,11 @@ func (n *node) processApplyCh() {
var perr error
p, ok := previous[key]
if ok && p.err == nil && p.size == psz {
n.elog.Printf("Proposal with key: %s already applied. Skipping index: %d.\n",
key, proposal.Index)
msg := fmt.Sprintf("Proposal with key: %d already applied. Skipping index: %d."+
" Delta: %+v Snapshot: %+v.\n",
key, proposal.Index, proposal.Delta, proposal.Snapshot)
n.elog.Printf(msg)
glog.Infof(msg)
previous[key].seen = time.Now() // Update the ts.
// Don't break here. We still need to call the Done below.

Expand Down

0 comments on commit 8c72479

Please sign in to comment.