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

feat: ignore trace decision messages produced by the publishers #1437

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

VinozzZ
Copy link
Contributor

@VinozzZ VinozzZ commented Nov 18, 2024

Which problem is this PR solving?

collect loop iteration is precious to make sure Refinery is able to process incoming data as soon as possible. Trace decision pubsub messages are broadcasted to all peers including the publisher itself. There's no need for the publisher to process those messages since it already knows about those trace decisions.

Short description of the changes

  • prefix each decision messages with the peer ID. I didn't include it into the compression logic. That way we can skip the whole decompression process for a message if we know it's produced by its publisher
  • ignore decision messages in the pubsub callback before we ask the collect loop to process them

@VinozzZ VinozzZ added this to the v2.9 milestone Nov 18, 2024
@VinozzZ VinozzZ self-assigned this Nov 18, 2024
@VinozzZ VinozzZ requested a review from a team as a code owner November 18, 2024 19:48
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

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

It could be faster if you want.

Also, the choice of | is a good one, but it would help to include a note that it can't occur in a URL or an IP address.

collect/trace_decision.go Outdated Show resolved Hide resolved
@VinozzZ VinozzZ merged commit a0e461e into main Nov 18, 2024
5 checks passed
@VinozzZ VinozzZ deleted the yingrong/prefix_peer_id branch November 18, 2024 20:58
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.

2 participants