This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve the performance of calculating ignored users in large rooms #9024
Improve the performance of calculating ignored users in large rooms #9024
Changes from 11 commits
8830f22
1e680b2
c2d7087
181db66
6577e64
179f37d
2e7a8e0
5abfb22
35d0743
0778a42
de57605
f7ea819
66eb152
f08f688
702b72b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
FYI changing this from an upsert has non-obvious performance cost:
simple_upsert
will be run inautocommit
mode which a) involves fewer round trips (as noBEGIN
/COMMIT
commands) and b) means it doesn't get run inREPEATABLE READ
isolation level, which has overhead and more likely to conflict with other transactions. I don't think it matters in this case though.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.
It is still doing a
simple_upsert_txn
internally, does that make sense or not really? Hopefully this won't conflict much since it would need to be a user conflicting with themself?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.
It's all correct currently, I just wanted to flag that calling
simple_upsert
is actually not the same as callingrunInteraction
andsimple_upsert_txn
from a perf PoV. I don't think we need to worry about it here though, as we're unlikely to see conflicts (which is where it really matters).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 plan to handle this in a separate PR.