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: Use a queue when retrying messages #1168

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

adityapk00
Copy link
Contributor

@adityapk00 adityapk00 commented Jul 19, 2023

Motivation

When retrying messages due to invalid signers, we should use a queue so we don't hammer the DB

Change Summary

  • Add queue when retrying messages
  • Improve logging

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 focuses on improving the diff sync process in the Hubble application.

Detailed summary

  • Fixes an issue with memory usage in the server when retrying messages.
  • Adds logging for progress during the ValidateOrRevokeMessagesJob.
  • Changes the scheduled time for the job from 5 minutes to 15 minutes.
  • Refactors the MergeResult type to a class and adds a method to add results.
  • Updates the performSync method to return a MergeResult instead of a boolean.
  • Adds a queue for retrying messages with failed signers during sync.

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

@changeset-bot
Copy link

changeset-bot bot commented Jul 19, 2023

🦋 Changeset detected

Latest commit: b2d23f5

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

@vercel
Copy link

vercel bot commented Jul 19, 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 Jul 19, 2023 11:02pm

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 69.56% and project coverage change: +0.06% 🎉

Comparison is base (998979d) 69.97% compared to head (b2d23f5) 70.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   69.97%   70.04%   +0.06%     
==========================================
  Files          80       80              
  Lines        7161     7193      +32     
  Branches     1519     1528       +9     
==========================================
+ Hits         5011     5038      +27     
- Misses       2013     2016       +3     
- Partials      137      139       +2     
Files Changed Coverage Δ
apps/hubble/src/rpc/server.ts 75.61% <0.00%> (ø)
...le/src/storage/jobs/validateOrRevokeMessagesJob.ts 2.85% <0.00%> (-0.13%) ⬇️
apps/hubble/src/network/sync/syncEngine.ts 69.26% <76.19%> (+0.55%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adityapk00 adityapk00 merged commit c1bb21c into farcasterxyz:main Jul 20, 2023
@adityapk00 adityapk00 deleted the retryq branch July 20, 2023 14:19
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.

1 participant