-
Notifications
You must be signed in to change notification settings - Fork 387
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: make snapshot sync retry and parallelize #2236
Conversation
🦋 Changeset detectedLatest commit: 7a92963 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
## Why is this change needed? Snapshot sync has become a very painful part of running a hub, to the point where it may take several attempts to start the node to get the snapshot to successfully download, on top of taking a long time to download all the chunks of the snapshot. This PR adds durability and parallelizes the download process (up to four simultaneous fetches, which appears to be the point where exceeding will become more unstable on fetch success). Snapshot sync now takes roughly 25-30 minutes to download. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces retry and parallelization for snapshot synchronization in the `@farcaster/hubble` package. ### Detailed summary - Added retry mechanism for decompressing snapshot chunks - Implemented parallel downloading of snapshot chunks - Improved error handling during snapshot synchronization > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
Why is this change needed?
Snapshot sync has become a very painful part of running a hub, to the point where it may take several attempts to start the node to get the snapshot to successfully download, on top of taking a long time to download all the chunks of the snapshot. This PR adds durability and parallelizes the download process (up to four simultaneous fetches, which appears to be the point where exceeding will become more unstable on fetch success). Snapshot sync now takes roughly 25-30 minutes to download.
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewPR-Codex overview
This PR introduces retry and parallelization for snapshot synchronization in the
@farcaster/hubble
package.Detailed summary