-
Notifications
You must be signed in to change notification settings - Fork 33
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(rfq-relayer): skip cache when fetching committable balances [SLT-386] #3328
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
services/rfq/relayer/service/handlers.go (1)
220-220
: Consider monitoring performance impact.While skipping the DB cache ensures data accuracy, it may impact performance due to increased direct balance checks. Consider monitoring response times and adding metrics to track any performance changes.
Also applies to: 629-629
services/rfq/relayer/inventory/manager.go (1)
458-458
: LGTM! Consider monitoring performance impact.The addition of
SkipDBCache()
ensures real-time gas balance accuracy, which is crucial for preventing failed transactions. However, bypassing the cache might impact performance under high load.Consider:
- Monitoring response times to detect any performance degradation
- Implementing a shorter cache TTL instead of completely skipping the cache if performance becomes a concern
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- services/rfq/relayer/inventory/manager.go (1 hunks)
- services/rfq/relayer/service/handlers.go (2 hunks)
🧰 Additional context used
🔇 Additional comments (2)
services/rfq/relayer/service/handlers.go (2)
220-220
: LGTM! Skipping DB cache in commitPendingBalance.The addition of
inventory.SkipDBCache()
ensures fresh balance data when committing pending balances, which is crucial for accurate balance management.
629-629
: LGTM! Skipping DB cache in handleNotEnoughInventory.The addition of
inventory.SkipDBCache()
ensures accurate balance checks during retry attempts, which is essential for proper inventory management.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3328 +/- ##
===================================================
- Coverage 33.25951% 33.22599% -0.03352%
===================================================
Files 543 543
Lines 34769 34780 +11
Branches 82 82
===================================================
- Hits 11564 11556 -8
- Misses 22182 22201 +19
Partials 1023 1023
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying sanguine-fe with Cloudflare Pages
|
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.
I believe this should resolve the "same time commit balance" problem, but worth noting that all GetCommittableBalance
calls are now done with SkipDBCache
option, so might want to enforce it there instead.
Relay time impact remains to be seen at staging, but shouldn't be massive?
Summary by CodeRabbit
New Features
Bug Fixes