Skip to content

Conversation

@vyzo
Copy link
Collaborator

@vyzo vyzo commented Mar 19, 2021

So that locally published messages are never dropped because of full validation queues.

Closes #398

So that locally published messages are never dropped because of full
validation queues.
@vyzo
Copy link
Collaborator Author

vyzo commented Mar 19, 2021

I also temporarily disabled the flaky delivery tag tracer test -- it's getting on my nerves. Follow up issue: #407

// ValidationError is an error that may be signalled from message publication when the message
// fails validation
type ValidationError struct {
Reason string
Copy link
Member

Choose a reason for hiding this comment

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

Nit: the nice way to do this is to make this "Reason" an error as well and expose it via Cause(). That way, one can check xerrors.Is(error, ValidationError{}) and xerrors.Is(error, UltimateCause{}).

Copy link
Collaborator Author

@vyzo vyzo Mar 31, 2021

Choose a reason for hiding this comment

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

In principle this is indeed quite nice, but it's quite likely unnecessary -- the Reason strings are exported and part of the public API for tracers.

We could add named errors for all of them but this seems more work than what is worth right now.

If you feel strongly about it, let's make an issue to address it.

@vyzo vyzo merged commit 84302e9 into master Mar 31, 2021
@vyzo vyzo deleted the fix/issue-398 branch March 31, 2021 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Published Messages Are Dropped In Gossipsub

3 participants