Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(raft): better logging message for cleaning banned ns pred (#7886)
Browse files Browse the repository at this point in the history
Co-authored-by: Aman Mangal <aman@dgraph.io>
2 people authored and jbhamra1 committed Aug 17, 2023
1 parent d932ac8 commit 033ab12
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion worker/draft.go
Original file line number Diff line number Diff line change
@@ -612,7 +612,15 @@ func (n *node) applyCommitted(proposal *pb.Proposal, key uint64) error {
proposal.CleanPredicate, proposal.ExpectedChecksum)
return nil
}
return posting.DeletePredicate(ctx, proposal.CleanPredicate, proposal.StartTs)
err := posting.DeletePredicate(ctx, proposal.CleanPredicate, proposal.StartTs)
if err == badger.ErrBannedKey {
// Zero might send the delete predicate instruction to alpha when updating the
// membership state. This can happen for predicates from banned namespaces too.
glog.Warningf("Couldn't clean the predicate %s as it is already banned.",
proposal.CleanPredicate)
return nil
}
return err

case proposal.Delta != nil:
n.elog.Printf("Applying Oracle Delta for key: %d", key)

0 comments on commit 033ab12

Please sign in to comment.