-
Notifications
You must be signed in to change notification settings - Fork 466
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: Reduce sync frequency #1648
fix: Reduce sync frequency #1648
Conversation
🦋 Changeset detectedLatest commit: 6d2aa74 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 ↗︎
|
f2893ac
to
6d2aa74
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1648 +/- ##
==========================================
- Coverage 73.85% 73.78% -0.07%
==========================================
Files 99 99
Lines 9010 9007 -3
Branches 2001 2000 -1
==========================================
- Hits 6654 6646 -8
- Misses 2238 2243 +5
Partials 118 118 ☔ View full report in Codecov by Sentry. |
// Temporarily disable sync with new peers | ||
log.debug({ peerInfo: message }, "New peer but skipping sync"); | ||
// const syncResult = await ResultAsync.fromPromise( | ||
// this.syncEngine.diffSyncIfRequired(this, peerId.toString()), |
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.
We should only be syncing the last ~ hour-days worth of messages here. Anything longer should happen in the sync job.
Motivation
Hubs are under significant load, we're syncing too often. Reducing sync frequency should help.
Will look into switching to probabilistic syncing across different time frames (higher frequency for recent timeframes and lower frequency for longer timeframes).
Change Summary
Describe the changes being made in 1-2 concise sentences.
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewAdditional Context
If this is a relatively large or complex change, provide more details here that will help reviewers
PR-Codex overview
This PR reduces the sync frequency of the Hubble app to help reduce the load on the hub.
Detailed summary
PeriodicSyncJobScheduler
.hubble.ts
file.