Commit Graph

93 Commits

Author SHA1 Message Date
Brendan Abolivier
963ffb60b9
Merge pull request #6340 from matrix-org/babolivier/pagination_query
Fix the SQL SELECT query in _paginate_room_events_txn
2019-11-08 11:12:24 +00:00
Brendan Abolivier
b16fa43386
Incorporate review 2019-11-08 10:34:09 +00:00
Erik Johnston
f713c01e2b
Merge pull request #6295 from matrix-org/erikj/split_purge_history
Split purge API into events vs state and add PurgeEventsStorage
2019-11-08 10:19:15 +00:00
Erik Johnston
e4ec82ce0f Move type annotation into docstring 2019-11-08 09:50:48 +00:00
Brendan Abolivier
46e5db9eb2
Merge pull request #6310 from matrix-org/babolivier/msc2326_bg_update
MSC2326: Add background update to take previous events into account
2019-11-07 22:54:56 +00:00
Brendan Abolivier
dad8d68c99
Update synapse/storage/data_stores/main/events_bg_updates.py
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-11-07 17:01:53 +00:00
Brendan Abolivier
6d360f099f
Update synapse/storage/data_stores/main/events_bg_updates.py
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-11-07 17:01:43 +00:00
Brendan Abolivier
c9b27d0044
Copy results 2019-11-07 16:47:45 +00:00
Brendan Abolivier
cd31201267 Revert "Back to using cursor_to_dict"
This reverts commit 1186612d6c.
2019-11-07 16:47:15 +00:00
Brendan Abolivier
1186612d6c
Back to using cursor_to_dict 2019-11-07 16:46:41 +00:00
Brendan Abolivier
ec2cb9f298
Initialise value before looping 2019-11-07 16:18:40 +00:00
Brendan Abolivier
bb78276bdc
Incorporate review 2019-11-07 15:25:27 +00:00
Brendan Abolivier
b9cba07962
Lint 2019-11-07 14:57:15 +00:00
Brendan Abolivier
70804392ae
Only join on event_labels if we're filtering on labels 2019-11-07 14:55:10 +00:00
Brendan Abolivier
15a1a02e70
Handle lack of filter 2019-11-07 12:04:37 +00:00
Brendan Abolivier
3f9b61ff95
Fix the SQL SELECT query in _paginate_room_events_txn
Doing a SELECT DISTINCT when paginating is quite expensive, because it requires the engine to do sorting on the entire events table. However, we only need to run it if we're filtering on 2+ labels, so this PR is changing the request so that DISTINCT is only used then.
2019-11-07 11:51:11 +00:00
Andrew Morgan
e914cf12f6
Merge pull request #6235 from matrix-org/anoa/room_upgrade_groups 2019-11-07 11:12:22 +00:00
Erik Johnston
5c3363233c Fix deleting state groups during room purge.
And fix the tests to actually test that things got deleted.
2019-11-06 17:02:08 +00:00
Erik Johnston
71f3bd734f Use correct type annotation 2019-11-06 17:00:18 +00:00
Andrew Morgan
b33c4f7a82 Numeric ID checker now checks @0, don't ratelimit on checking 2019-11-06 11:55:00 +00:00
Brendan Abolivier
24a214bd1b
Fix field name 2019-11-06 11:04:19 +00:00
Brendan Abolivier
70d93cafdb
Update insert 2019-11-06 10:59:03 +00:00
Richard van der Hoff
807ec3bd99
Fix bug which caused rejected events to be stored with the wrong room state (#6320)
Fixes a bug where rejected events were persisted with the wrong state group.

Also fixes an occasional internal-server-error when receiving events over
federation which are rejected and (possibly because they are
backwards-extremities) have no prev_group.

Fixes #6289.
2019-11-06 10:01:39 +00:00
Andrew Morgan
c2203bea57 Re-add docstring, with caveats detailed 2019-11-04 18:17:11 +00:00
Andrew Morgan
0287d033ee Transfer upgraded rooms on groups 2019-11-04 18:08:50 +00:00
Erik Johnston
7134ca7daa Change to not require a state_groups.room_id index.
This does mean that we won't clean up orphaned state groups (i.e. state
groups that were persisted but the associated event wasn't).
2019-11-04 13:36:57 +00:00
Erik Johnston
6a0092d371 Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_purge_history 2019-11-04 13:29:35 +00:00
Brendan Abolivier
3b29a73f9f
Print out the actual number of affected rows 2019-11-04 09:56:11 +00:00
Brendan Abolivier
824bba2f78
Correctly order results 2019-11-04 09:56:11 +00:00
Brendan Abolivier
49008e674f
TODO 2019-11-04 09:56:11 +00:00
Brendan Abolivier
1586f2c7e7
Fix exit condition 2019-11-04 09:56:11 +00:00
Brendan Abolivier
1c1268245d
Lint 2019-11-04 09:56:11 +00:00
Brendan Abolivier
911b03ca31
Don't try to process events we already have a label for 2019-11-04 09:56:10 +00:00
Brendan Abolivier
07cb38e965
Use a sensible default value for labels 2019-11-04 09:56:10 +00:00
Brendan Abolivier
a46574281d
Use the right format for rows 2019-11-04 09:56:10 +00:00
Brendan Abolivier
c9a1b80a74
MSC2326: Add background update to take previous events into account 2019-11-04 09:56:04 +00:00
Brendan Abolivier
f496d25877
Merge pull request #6301 from matrix-org/babolivier/msc2326
Implement MSC2326 (label based filtering)
2019-11-01 17:04:45 +00:00
Brendan Abolivier
988d8d6507
Incorporate review 2019-11-01 16:22:44 +00:00
Brendan Abolivier
5598445655
Update synapse/storage/data_stores/main/schema/delta/56/event_labels.sql
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-11-01 16:18:34 +00:00
Hubert Chathi
fa7e52caf1
Merge pull request #6313 from matrix-org/uhoreg/cross_signing_fix_sqlite_schema
fix hidden field in devices table for older sqlite
2019-11-01 10:52:46 -04:00
Brendan Abolivier
a2c63c619a
Add more data to the event_labels table and fix the indexes 2019-11-01 11:47:28 +00:00
Erik Johnston
669b6cbda3 Fix up comment 2019-11-01 11:32:20 +00:00
Brendan Abolivier
57cdb046e4
Lint 2019-11-01 10:39:14 +00:00
Brendan Abolivier
c6dbca2422
Incorporate review 2019-11-01 10:30:51 +00:00
Hubert Chathi
c61db13183 fix hidden field in devices table for older sqlite 2019-10-31 22:52:55 -04:00
Hubert Chathi
c3fc176c60
Update synapse/storage/data_stores/main/devices.py
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-10-31 22:49:48 -04:00
Hubert Chathi
6f4bc6d01d Merge branch 'develop' into cross-signing_federation 2019-10-31 22:38:21 -04:00
Hubert Chathi
9c94b48bf1 Merge branch 'develop' into uhoreg/cross_signing_fix_workers_notify 2019-10-31 12:32:07 -04:00
Erik Johnston
fb1a6914cf Update log line to lie a little less 2019-10-31 15:45:48 +00:00
Amber Brown
020add5099
Update black to 19.10b0 (#6304)
* update version of black and also fix the mypy config being overridden
2019-11-01 02:43:24 +11:00