Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix quarantine media admin API and search reindex #3130

Merged
merged 2 commits into from
Apr 25, 2018

Conversation

erikjohnston
Copy link
Member

This was broken in #3060.

The issue is that room_id became ambiguous as it was in both events and event_json tables.

@richvdh
Copy link
Member

richvdh commented Apr 25, 2018

oh, sadness.

Shame this wasn't picked up in the tests.

@richvdh
Copy link
Member

richvdh commented Apr 25, 2018

(I don't suppose I can persuade you to add a test?)

@@ -595,7 +595,7 @@ def _get_media_mxcs_in_room_txn(self, txn, room_id):
while next_token:
sql = """
SELECT stream_ordering, json FROM events
JOIN event_json USING (event_id)
JOIN event_json USING (room_id, event_id)
WHERE room_id = ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be preferable to update this to WHERE events.room_id = ? ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really change anything query optimisation wise, other than giving the optimiser more leeway over which index to use.

@richvdh richvdh assigned erikjohnston and unassigned richvdh Apr 25, 2018
@erikjohnston
Copy link
Member Author

@matrixbot retest this please

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. still no tests though :'(

@erikjohnston
Copy link
Member Author

I know :'(

@erikjohnston erikjohnston merged commit a5ad889 into develop Apr 25, 2018
@erikjohnston erikjohnston changed the title Fix quarantine media admin API Fix quarantine media admin API and search reindex Apr 25, 2018
neilisfragile added a commit that referenced this pull request Apr 27, 2018
Changes in synapse v0.28.0-rc1 (2018-04-26)
===========================================

Bug Fixes:

* Fix quarantine media admin API and search reindex (PR #3130)
* Fix media admin APIs (PR #3134)

Changes in synapse v0.28.0-rc1 (2018-04-24)
===========================================

Minor performance improvement to federation sending and bug fixes.

(Note: This release does not include state resolutions discussed in matrix live)

Features:

* Add metrics for event processing lag (PR #3090)
* Add metrics for ResponseCache (PR #3092)

Changes:

* Synapse on PyPy (PR #2760) Thanks to @Valodim!
* move handling of auto_join_rooms to RegisterHandler (PR #2996) Thanks to @krombel!
* Improve handling of SRV records for federation connections (PR #3016) Thanks to @silkeh!
* Document the behaviour of ResponseCache (PR #3059)
* Preparation for py3 (PR #3061, #3073, #3074, #3075, #3103, #3104, #3106, #3107, #3109, #3110) Thanks to @NotAFile!
* update prometheus dashboard to use new metric names (PR #3069) Thanks to @krombel!
* use python3-compatible prints (PR #3074) Thanks to @NotAFile!
* Send federation events concurrently (PR #3078)
* Limit concurrent event sends for a room (PR #3079)
* Improve R30 stat definition (PR #3086)
* Send events to ASes concurrently (PR #3088)
* Refactor ResponseCache usage (PR #3093)
* Clarify that SRV may not point to a CNAME (PR #3100) Thanks to @silkeh!
* Use str(e) instead of e.message (PR #3103) Thanks to @NotAFile!
* Use six.itervalues in some places (PR #3106) Thanks to @NotAFile!
* Refactor store.have_events (PR #3117)

Bug Fixes:

* Return 401 for invalid access_token on logout (PR #2938) Thanks to @dklug!
* Return a 404 rather than a 500 on rejoining empty rooms (PR #3080)
* fix federation_domain_whitelist (PR #3099)
* Avoid creating events with huge numbers of prev_events (PR #3113)
* Reject events which have lots of prev_events (PR #3118)
@erikjohnston erikjohnston deleted the erikj/fix_quarantine_room branch September 20, 2018 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants