-
Notifications
You must be signed in to change notification settings - Fork 210
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
Cache session outcome count #4072
Conversation
Otherwise, federations become slower the longer they run.
I ran into some trouble with DB migration tests, could you take a look at 487a5c4 in particular please @m1sterc001guy? Is my attempt to fix it correct or am I missing something? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4072 +/- ##
=======================================
Coverage 58.28% 58.29%
=======================================
Files 193 193
Lines 42580 42605 +25
=======================================
+ Hits 24819 24836 +17
- Misses 17761 17769 +8 ☔ View full report in Codecov by Sentry. |
Otherwise, migration tests won't actually run migrations.
487a5c4
to
edf8d46
Compare
This is correct, thanks for pointing that out. It hadn't mattered before since we were just reading from old dbs to catch breaking changes, but now with a migration it is needed. |
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 don't think it's a cache, but LGTM.
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin releases/v0.2
git worktree add -d .worktree/backport-4072-to-releases/v0.2 origin/releases/v0.2
cd .worktree/backport-4072-to-releases/v0.2
git switch --create backport-4072-to-releases/v0.2
git cherry-pick -x a29d1ff79feeade7c384088b8c1c8a5b5520f421 62b6df4cef5c804d1fd5e61faee510f4d5b25586 edf8d46813780bf8603867a37cb47fb2d905b140 |
@fedimint-backports Disappointing. |
What would you call it? It's redundant/something we could re-build any time, but at considerable cost. |
I call it "denormalized data" |
Introduces a DB entry that caches the number of session outcomes in the DB so that we don't have to scan the entire DB every time we need this number.
Fixes #4066