From 8c72479b33cfd2f803089de314220e3d8028d053 Mon Sep 17 00:00:00 2001 From: Anurag Date: Thu, 5 Jan 2023 02:25:33 +0530 Subject: [PATCH] chore(logs): add logs to track dropped proposals (#8012) (#8568) (cherry picked from commit db841dece9fde1243bf2ae3b1131513cf15408d6) (cherry picked from commit 989c9dbdcbe81038a1c063d73c236a0d4ffdbae4) Co-authored-by: Naman Jain --- worker/draft.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/worker/draft.go b/worker/draft.go index ad70134ce4d..0804888685f 100644 --- a/worker/draft.go +++ b/worker/draft.go @@ -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.