Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(log): better logging message for cleaning banned ns pred #7886

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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