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

Ignore Pubsub Messages Hitting Context Deadlines #13716

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Mar 11, 2024

What type of PR is this?

Bug Fix

What does this PR do? Why is it needed?

In the event we hit a context deadline processing a message, we do not reject that message and penalize the peer. Instead we simply ignore and drop them.

Which issues(s) does this PR fix?

N.A

Other notes for review

@nisdas nisdas added Ready For Review A pull request ready for code review Networking P2P related items labels Mar 11, 2024
@nisdas nisdas requested a review from a team as a code owner March 11, 2024 04:31
@@ -286,6 +286,11 @@ func (s *Service) wrapAndReportValidation(topic string, v wrappedVal) (string, p
return pubsub.ValidationIgnore
}
b, err := v(ctx, pid, msg)
// We do not penalize peers if we are hitting pubsub timeouts
// trying to process those messages.
if b == pubsub.ValidationReject && ctx.Err() != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides timeouts, this also implies context cancelled which is still good. We don't want to Reject and penalize a peer when a context is cancelled

@nisdas nisdas enabled auto-merge March 11, 2024 04:36
@nisdas nisdas added this pull request to the merge queue Mar 11, 2024
Merged via the queue into develop with commit cb8eb4e Mar 11, 2024
17 checks passed
@nisdas nisdas deleted the ignoreDeadlines branch March 11, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Networking P2P related items Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants