This repository was archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
2.4.78 #4345
Merged
Merged
2.4.78 #4345
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lts at lower level
Fix thread share meta images
This was leftover behavior from the move to create-query, but is actually unnecessary.
This adds two new indexes to `usersChannels` and rewrites all queries to
use them:
- `userIdAndRole`
- `channelIdAndRole`
"Role" is one of the roles a user can have in a channel, and is based on
the `is{Role}` fields, i.e. "Role" can be one of "blocked", "pending",
"owner", "moderator", "owner".
Note that the index prefers roles in that order, so even if a write
query is inconsistent and a member has `isMember: true` but also
`isBlocked: true` the user will be counted as blocked.
----
This is modeled after the same thing we did for `usersCommunities`, but
I realized that adding 5 indexes to a table as big as `usersCommunities`
and `usersChannels` is pretty expensive storage-wise. (I could've also
implemented the same indexes as `usersCommunities`, i.e.
`userIdAndIsMember`, `userIdAndIsBlocked`, etc.)
This achieves the same thing and makes all queries be indexed, but
requires a lot less storage. We should probably also move the
usersCommunities indexes to this `*AndRole` system...
…ages-sent-in-emails
Fix settings buttons on community/channel views
Generated by 🚫 dangerJS |
Contributor
Author
|
Didn't have time to ship this today, but I put everything on alpha for some usage testing - happy to ship tomorrow @mxstbr :) |
Add analytics as server option in PR template
Should alleviate some load on the communities table, rather than having to go through all of them this is now mostly instantaneous!
Note: Untested
…l-plugin-styled-components-1.9.0 [api] Update babel-plugin-styled-components: 1.8.0 → 1.9.0 (minor)
…ex-chronos Add communities "memberCount" index, rewrite chronos queries
Use message threadIdAndTimestamp index for getNewMessageCount query
Use threadIdAndTimestamp index in mercury db query
Sign images sent in emails
Fix channel join leave buttons
Add *AndRole indexes to usersChannels
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Status
Deploy after merge (delete what needn't be deployed)
Run database migrations (delete if no migration was added)
YES