Skip to content

Commit

Permalink
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>
  • Loading branch information
NamanJain8 and mangalaman93 committed Aug 16, 2023
1 parent 8c83c93 commit 2bd6569
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
Expand Up @@ -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)
Expand Down

0 comments on commit 2bd6569

Please sign in to comment.