This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Be more agressive about purging old room event_push_actions #1873
Merged
Conversation
This file contains 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
Actually, the API does allow you to paginate on plain notifications, though I don't think anybody uses it. |
isn't this precisely what the notification tab does in riot/web?
…--
Matthew Hodgson
Matrix.org
On 1 Feb 2017, at 19:22, Erik Johnston ***@***.***> wrote:
Actually, the API does allow you to paginate on plain notifications, though I don't think anybody uses it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@ara4n They are just highlights I thought? |
@@ -475,7 +479,8 @@ def _remove_old_push_actions_before_txn(self, txn, room_id, user_id, | |||
txn.execute( | |||
"DELETE FROM event_push_actions " | |||
" WHERE user_id = ? AND room_id = ? AND " | |||
" topological_ordering < ? AND stream_ordering < ?", | |||
" topological_ordering < ?" | |||
" AND ((stream_ordering < ? AND highlight = 1) or highlight = 0)", |
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.
Capitalise "OR" please.
Apart from the capitalisation LGTM. The query plans before and after are:
I don't think it matters that we're losing the |
erikjohnston
added a commit
that referenced
this pull request
Mar 13, 2017
Changes in synapse v0.19.3-rc1 (2017-03-08) =========================================== Features: * Add some administration functionalities. Thanks to morteza-araby! (PR #1784) Changes: * Reduce database table sizes (PR #1873, #1916, #1923, #1963) * Update contrib/ to not use syutil. Thanks to andrewshadura! (PR #1907) * Don't fetch current state when sending an event in common case (PR #1955) Bug fixes: * Fix synapse_port_db failure. Thanks to Pneumaticat! (PR #1904) * Fix caching to not cache error responses (PR #1913) * Fix APIs to make kick & ban reasons work (PR #1917) * Fix bugs in the /keys/changes api (PR #1921) * Fix bug where users couldn't forget rooms they were banned from (PR #1922) * Fix issue with long language values in pushers API (PR #1925) * Fix a race in transaction queue (PR #1930) * Fix dynamic thumbnailing to preserve aspect ratio. Thanks to jkolo! (PR #1945) * Fix device list update to not constantly resync (PR #1964) * Fix potential for huge memory usage when getting device that have changed (PR #1969)
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.
There's no reason to keep a months worth of notifications after they've been read. While the pushers do use the table, they shouldn't be needing to send anything that has already been read.
We keep a months worth of highlights so that the notification API still works.