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

Send subscription messages in order #3458

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

dceleda
Copy link
Contributor

@dceleda dceleda commented Oct 1, 2021

Fixes #3457
Partially Fixes #3444

Changes:

Subscription messages will be queued up and sent in order.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • No

Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

Not sure about performance considerations of scheduling tasks as well as creating a channel per each subscription

@dceleda
Copy link
Contributor Author

dceleda commented Oct 1, 2021

Not sure about performance considerations of scheduling tasks as well as creating a channel per each subscription

We've been creating tasks there anyway so I just queued them up.
Channels should perform better than blockingcollection or other structures.

We could potentially optimize it. For example use a dedicated task scheduler and runsynchronously on it.

@dceleda dceleda force-pushed the bug/3457_raceConditionsInSubscriptions branch from a1b3fb4 to b9ab108 Compare October 4, 2021 09:36
@LukaszRozmej LukaszRozmej merged commit 4a8c52c into master Oct 4, 2021
@LukaszRozmej LukaszRozmej deleted the bug/3457_raceConditionsInSubscriptions branch October 4, 2021 19:38
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.

Possible race conditions in Subscriptions newHeads subscription is missing blocks when a re-org happens
3 participants