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

EVM-554: Some events might not be received by subscriber #1361

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Apr 5, 2023

Description

In the subscription.go, eventStream when pushing new event to all subscriptions, had a select case with default branch, where in case an event could not be added to the update channel, just ignored it. This is not a correct way, since most of the time, we need all the events that we subscribed to.

Through this PR, we are now using buffered update channels to mitigate the case where some events might not be passed to the subscriber.
PR also cleans the code from unnecessary go routines, and adds a new UT test.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal force-pushed the evm-554-Some-events-might-not-be-received-by-subscriber branch from 581e5fb to 4f6a06a Compare April 5, 2023 10:11
@goran-ethernal goran-ethernal requested a review from a team April 5, 2023 10:15
@goran-ethernal goran-ethernal self-assigned this Apr 5, 2023
@goran-ethernal goran-ethernal added the bug fix Functionality that fixes a bug label Apr 5, 2023
@goran-ethernal goran-ethernal marked this pull request as ready for review April 5, 2023 11:09
@goran-ethernal goran-ethernal force-pushed the evm-554-Some-events-might-not-be-received-by-subscriber branch from 4f6a06a to 0ca62de Compare April 7, 2023 08:25
@goran-ethernal goran-ethernal merged commit eb45dba into develop Apr 7, 2023
@goran-ethernal goran-ethernal deleted the evm-554-Some-events-might-not-be-received-by-subscriber branch April 7, 2023 09:06
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants