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

fix: Consolidate to a single subscribe stream in Replicator #1553

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

sds
Copy link
Member

@sds sds commented Nov 1, 2023

Motivation

We were seeing issues where events would arrive out of order when processing two streams. To avoid this, have them be processed on the same stream, where hubs will ensure they are emitted in order (specifically FID registration followed by messages for the given FID).

Change Summary

Describe the changes being made in 1-2 concise sentences.

Merge Checklist


PR-Codex overview

This PR consolidates the subscription connections in the HubReplicator class.

Detailed summary

  • Consolidates the chain events and other events subscriptions into a single "all-events" subscription.
  • Updates the corresponding variables and keys.
  • Removes unused imports and variables.
  • Updates the event processing logic.
  • Starts and stops the new subscription.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

We were seeing issues where events would arrive out of order when
processing two streams. To avoid this, have them be processed on the
same stream, where hubs will ensure they are emitted in order
(specifically FID registration followed by messages for the given FID).
Copy link

vercel bot commented Nov 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 1:09am

Copy link

changeset-bot bot commented Nov 1, 2023

🦋 Changeset detected

Latest commit: 135e023

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/replicator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

see 4 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@sds sds added the t-bug A fix for a bug with the current system label Nov 1, 2023
@sds sds merged commit 406de33 into main Nov 1, 2023
8 checks passed
@sds sds deleted the sds/subscription branch November 1, 2023 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-bug A fix for a bug with the current system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant