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: make snapshot sync retry and parallelize #2236

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

CassOnMars
Copy link
Member

@CassOnMars CassOnMars commented Aug 2, 2024

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


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}

@CassOnMars CassOnMars added t-feat Add a new feature or protocol improvement t-perf Improve performance labels Aug 2, 2024
Copy link

changeset-bot bot commented Aug 2, 2024

🦋 Changeset detected

Latest commit: 7a92963

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

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble 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

vercel bot commented Aug 2, 2024

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 Aug 2, 2024 3:15am

Copy link
Contributor

@sanjayprabhu sanjayprabhu left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@CassOnMars CassOnMars merged commit 63dd7c9 into main Aug 6, 2024
6 checks passed
@CassOnMars CassOnMars deleted the cassie-heart/sync-but-make-it-durable branch August 6, 2024 05:55
tybook pushed a commit to tybook/hub-monorepo that referenced this pull request Aug 20, 2024
## 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-feat Add a new feature or protocol improvement t-perf Improve performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants