From f3788e3c7881de25c7d699bb9940b3cbd4dc3682 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 17 Dec 2014 23:37:08 +0000 Subject: [PATCH 01/10] Test some ideas that might help performance a bit --- synapse/handlers/federation.py | 4 ++-- synapse/storage/_base.py | 34 ++++++++++++++++++++++++++++------ synapse/storage/roommember.py | 8 +------- synapse/storage/state.py | 9 +-------- 4 files changed, 32 insertions(+), 23 deletions(-) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index b76dcd98e..2f6036145 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -91,7 +91,7 @@ class FederationHandler(BaseHandler): yield run_on_reactor() - yield self.replication_layer.send_pdu(event, destinations) + self.replication_layer.send_pdu(event, destinations) @log_function @defer.inlineCallbacks @@ -527,7 +527,7 @@ class FederationHandler(BaseHandler): event.signatures, ) - yield self.replication_layer.send_pdu(new_pdu, destinations) + self.replication_layer.send_pdu(new_pdu, destinations) state_ids = [e.event_id for e in context.current_state.values()] auth_chain = yield self.store.get_auth_chain(set( diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index e0d97f440..a6e2e0e2e 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -440,14 +440,29 @@ class SQLBaseStore(object): ) def _get_events_txn(self, txn, event_ids): - events = [] - for e_id in event_ids: - ev = self._get_event_txn(txn, e_id) + if not event_ids: + return [] - if ev: - events.append(ev) + if len(event_ids) > 50: + events = [] + n = 50 + for e_ids in [event_ids[i:i + n] for i in range(0, len(event_ids), n)]: + events.extend(self._get_events_txn(txn, e_ids)) + return events - return events + where_clause = " OR ".join(["e.event_id = ?" for _ in event_ids]) + + sql = ( + "SELECT internal_metadata, json, r.event_id FROM event_json as e " + "LEFT JOIN redactions as r ON e.event_id = r.redacts " + "WHERE %s" + ) % (where_clause,) + + txn.execute(sql, event_ids) + + res = txn.fetchall() + + return [self._get_event_from_row_txn(txn, *r) for r in res] def _get_event_txn(self, txn, event_id, check_redacted=True, get_prev_content=True): @@ -467,6 +482,13 @@ class SQLBaseStore(object): internal_metadata, js, redacted = res + return self._get_event_from_row_txn( + txn, internal_metadata, js, redacted, check_redacted=check_redacted, + get_prev_content=get_prev_content, + ) + + def _get_event_from_row_txn(self, txn, internal_metadata, js, redacted, + check_redacted=True, get_prev_content=True): d = json.loads(js) internal_metadata = json.loads(internal_metadata) diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 05b275663..4e416c50b 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -183,20 +183,14 @@ class RoomMemberStore(SQLBaseStore): ) def _get_members_query_txn(self, txn, where_clause, where_values): - del_sql = ( - "SELECT event_id FROM redactions WHERE redacts = e.event_id " - "LIMIT 1" - ) - sql = ( - "SELECT e.*, (%(redacted)s) AS redacted FROM events as e " + "SELECT e.* FROM events as e " "INNER JOIN room_memberships as m " "ON e.event_id = m.event_id " "INNER JOIN current_state_events as c " "ON m.event_id = c.event_id " "WHERE %(where)s " ) % { - "redacted": del_sql, "where": where_clause, } diff --git a/synapse/storage/state.py b/synapse/storage/state.py index afe3e5ede..ab8090971 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -62,14 +62,7 @@ class StateStore(SQLBaseStore): keyvalues={"state_group": group}, retcol="event_id", ) - state = [] - for state_id in state_ids: - s = self._get_events_txn( - txn, - [state_id], - ) - if s: - state.extend(s) + state = self._get_events_txn(txn, state_ids) res[group] = state From f0128f9600c59fbcb993bccbbbb32486009694d7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 10:55:43 +0000 Subject: [PATCH 02/10] Add RoomMemberStore.get_users_in_room, so that we can get the list of joined users without having to retrieve the full events --- synapse/handlers/room.py | 13 +++++-------- synapse/storage/roommember.py | 13 +++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index deefc3c11..5e5d95add 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -245,14 +245,12 @@ class RoomMemberHandler(BaseHandler): self.distributor.declare("user_left_room") @defer.inlineCallbacks - def get_room_members(self, room_id, membership=Membership.JOIN): + def get_room_members(self, room_id): hs = self.hs - memberships = yield self.store.get_room_members( - room_id=room_id, membership=membership - ) + users = yield self.store.get_users_in_room(room_id) - defer.returnValue([hs.parse_userid(m.user_id) for m in memberships]) + defer.returnValue([hs.parse_userid(u) for u in users]) @defer.inlineCallbacks def fetch_room_distributions_into(self, room_id, localusers=None, @@ -531,11 +529,10 @@ class RoomListHandler(BaseHandler): def get_public_room_list(self): chunk = yield self.store.get_rooms(is_public=True) for room in chunk: - joined_members = yield self.store.get_room_members( + joined_users = yield self.store.get_users_in_room( room_id=room["room_id"], - membership=Membership.JOIN ) - room["num_joined_members"] = len(joined_members) + room["num_joined_members"] = len(joined_users) # FIXME (erikj): START is no longer a valid value defer.returnValue({"start": "START", "end": "END", "chunk": chunk}) diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 4e416c50b..4921561fc 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -123,6 +123,19 @@ class RoomMemberStore(SQLBaseStore): else: return None + def get_users_in_room(self, room_id): + def f(txn): + sql = ( + "SELECT m.user_id FROM room_memberships as m" + " INNER JOIN current_state_events as c" + " ON m.event_id = c.event_id" + " WHERE m.membership = ? AND m.room_id = ?" + ) + + txn.execute(sql, (Membership.JOIN, room_id)) + return [r[0] for r in txn.fetchall()] + return self.runInteraction("get_users_in_room", f) + def get_room_members(self, room_id, membership=None): """Retrieve the current room member list for a room. From d7e8ea67b374d3b006f7277de531302abc410e57 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 11:18:02 +0000 Subject: [PATCH 03/10] Reformat --- synapse/storage/_base.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index a6e2e0e2e..a30b0bc41 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -440,15 +440,16 @@ class SQLBaseStore(object): ) def _get_events_txn(self, txn, event_ids): - if not event_ids: - return [] + if not event_ids: + return [] - if len(event_ids) > 50: - events = [] - n = 50 - for e_ids in [event_ids[i:i + n] for i in range(0, len(event_ids), n)]: - events.extend(self._get_events_txn(txn, e_ids)) - return events + if len(event_ids) > 50: + events = [] + n = 50 + split = [event_ids[i:i + n] for i in range(0, len(event_ids), n)] + for e_ids in split: + events.extend(self._get_events_txn(txn, e_ids)) + return events where_clause = " OR ".join(["e.event_id = ?" for _ in event_ids]) @@ -482,13 +483,13 @@ class SQLBaseStore(object): internal_metadata, js, redacted = res - return self._get_event_from_row_txn( - txn, internal_metadata, js, redacted, check_redacted=check_redacted, - get_prev_content=get_prev_content, - ) + return self._get_event_from_row_txn( + txn, internal_metadata, js, redacted, check_redacted=check_redacted, + get_prev_content=get_prev_content, + ) def _get_event_from_row_txn(self, txn, internal_metadata, js, redacted, - check_redacted=True, get_prev_content=True): + check_redacted=True, get_prev_content=True): d = json.loads(js) internal_metadata = json.loads(internal_metadata) From 753126b8ccb56dc6539ce95758f3e87fe181064d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 11:18:12 +0000 Subject: [PATCH 04/10] Add some debug logging --- synapse/storage/state.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/synapse/storage/state.py b/synapse/storage/state.py index ab8090971..9aeb0b406 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -15,6 +15,10 @@ from ._base import SQLBaseStore +import logging + +logger = logging.getLogger(__name__) + class StateStore(SQLBaseStore): """ Keeps track of the state at a given event. @@ -54,6 +58,8 @@ class StateStore(SQLBaseStore): if group: groups.add(group) + logger.debug("Got groups: %s", groups) + res = {} for group in groups: state_ids = self._simple_select_onecol_txn( @@ -62,6 +68,12 @@ class StateStore(SQLBaseStore): keyvalues={"state_group": group}, retcol="event_id", ) + + logger.debug( + "Got %d events for group %s", + len(state_ids), group + ) + state = self._get_events_txn(txn, state_ids) res[group] = state From f4ea78e9e2578f0d0ba4345b3b45390e905438e3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 11:24:18 +0000 Subject: [PATCH 05/10] More debug logging --- synapse/storage/_base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index a30b0bc41..de08c78ed 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -443,6 +443,8 @@ class SQLBaseStore(object): if not event_ids: return [] + logger.debug("_get_events_txn called with %d events", len(event_ids)) + if len(event_ids) > 50: events = [] n = 50 @@ -451,6 +453,8 @@ class SQLBaseStore(object): events.extend(self._get_events_txn(txn, e_ids)) return events + logger.debug("_get_events_txn Fetching %d events", len(event_ids)) + where_clause = " OR ".join(["e.event_id = ?" for _ in event_ids]) sql = ( From 3e26720e0574393dc8076b3d4099e16213ce2e6d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 11:26:58 +0000 Subject: [PATCH 06/10] Temporarily turn off 'redacted_because' and 'prev_content' keys --- synapse/storage/_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index de08c78ed..d63655643 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -499,6 +499,8 @@ class SQLBaseStore(object): ev = FrozenEvent(d, internal_metadata_dict=internal_metadata) + return ev + if check_redacted and redacted: ev = prune_event(ev) From 98933e3db6d43dcb3c8c21d0b65e2647bc3fb303 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 13:03:23 +0000 Subject: [PATCH 07/10] Only fetch prev_content when a client is streaming/paginating. Use transactions for event streams. --- synapse/storage/_base.py | 32 ++++++--- synapse/storage/stream.py | 142 ++++++++++++++++++-------------------- 2 files changed, 90 insertions(+), 84 deletions(-) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index d63655643..9702ab4f4 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -434,12 +434,15 @@ class SQLBaseStore(object): return self.runInteraction("_simple_max_id", func) - def _get_events(self, event_ids): + def _get_events(self, event_ids, check_redacted=True, + get_prev_content=False): return self.runInteraction( - "_get_events", self._get_events_txn, event_ids + "_get_events", self._get_events_txn, event_ids, + check_redacted=check_redacted, get_prev_content=get_prev_content, ) - def _get_events_txn(self, txn, event_ids): + def _get_events_txn(self, txn, event_ids, check_redacted=True, + get_prev_content=False): if not event_ids: return [] @@ -450,7 +453,13 @@ class SQLBaseStore(object): n = 50 split = [event_ids[i:i + n] for i in range(0, len(event_ids), n)] for e_ids in split: - events.extend(self._get_events_txn(txn, e_ids)) + events.extend( + self._get_events_txn( + txn, e_ids, + check_redacted=check_redacted, + get_prev_content=get_prev_content, + ) + ) return events logger.debug("_get_events_txn Fetching %d events", len(event_ids)) @@ -467,10 +476,17 @@ class SQLBaseStore(object): res = txn.fetchall() - return [self._get_event_from_row_txn(txn, *r) for r in res] + return [ + self._get_event_from_row_txn( + txn, r[0], r[1], r[2], + check_redacted=check_redacted, + get_prev_content=get_prev_content, + ) + for r in res + ] def _get_event_txn(self, txn, event_id, check_redacted=True, - get_prev_content=True): + get_prev_content=False): sql = ( "SELECT internal_metadata, json, r.event_id FROM event_json as e " "LEFT JOIN redactions as r ON e.event_id = r.redacts " @@ -493,14 +509,12 @@ class SQLBaseStore(object): ) def _get_event_from_row_txn(self, txn, internal_metadata, js, redacted, - check_redacted=True, get_prev_content=True): + check_redacted=True, get_prev_content=False): d = json.loads(js) internal_metadata = json.loads(internal_metadata) ev = FrozenEvent(d, internal_metadata_dict=internal_metadata) - return ev - if check_redacted and redacted: ev = prune_event(ev) diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 3405cb365..c51f48945 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -137,12 +137,12 @@ class StreamStore(SQLBaseStore): with_feedback=with_feedback, ) - @defer.inlineCallbacks @log_function def get_room_events_stream(self, user_id, from_key, to_key, room_id, limit=0, with_feedback=False): # TODO (erikj): Handle compressed feedback + current_room_membership_sql = ( "SELECT m.room_id FROM room_memberships as m " "INNER JOIN current_state_events as c ON m.event_id = c.event_id " @@ -157,11 +157,6 @@ class StreamStore(SQLBaseStore): "WHERE m.user_id = ? " ) - del_sql = ( - "SELECT event_id FROM redactions WHERE redacts = e.event_id " - "LIMIT 1" - ) - if limit: limit = max(limit, MAX_STREAM_SIZE) else: @@ -172,38 +167,42 @@ class StreamStore(SQLBaseStore): to_id = _parse_stream_token(to_key) if from_key == to_key: - defer.returnValue(([], to_key)) - return + return defer.succeed(([], to_key)) sql = ( - "SELECT *, (%(redacted)s) AS redacted FROM events AS e WHERE " + "SELECT e.event_id, e.stream_ordering FROM events AS e WHERE " "(e.outlier = 0 AND (room_id IN (%(current)s)) OR " "(event_id IN (%(invites)s))) " "AND e.stream_ordering > ? AND e.stream_ordering <= ? " "ORDER BY stream_ordering ASC LIMIT %(limit)d " ) % { - "redacted": del_sql, "current": current_room_membership_sql, "invites": membership_sql, "limit": limit } - rows = yield self._execute_and_decode( - sql, - user_id, user_id, from_id, to_id - ) + def f(txn): + txn.execute(sql, (user_id, user_id, from_id, to_id,)) - ret = yield self._parse_events(rows) + rows = self.cursor_to_dict(txn) - if rows: - key = "s%d" % max([r["stream_ordering"] for r in rows]) - else: - # Assume we didn't get anything because there was nothing to get. - key = to_key + ret = self._get_events_txn( + txn, + [r["event_id"] for r in rows], + get_prev_content=True + ) - defer.returnValue((ret, key)) + if rows: + key = "s%d" % max([r["stream_ordering"] for r in rows]) + else: + # Assume we didn't get anything because there was nothing to + # get. + key = to_key + + return ret, key + + return self.runInteraction("get_room_events_stream", f) - @defer.inlineCallbacks @log_function def paginate_room_events(self, room_id, from_key, to_key=None, direction='b', limit=-1, @@ -221,7 +220,9 @@ class StreamStore(SQLBaseStore): bounds = _get_token_bound(from_key, from_comp) if to_key: - bounds = "%s AND %s" % (bounds, _get_token_bound(to_key, to_comp)) + bounds = "%s AND %s" % ( + bounds, _get_token_bound(to_key, to_comp) + ) if int(limit) > 0: args.append(int(limit)) @@ -229,87 +230,78 @@ class StreamStore(SQLBaseStore): else: limit_str = "" - del_sql = ( - "SELECT event_id FROM redactions WHERE redacts = events.event_id " - "LIMIT 1" - ) - sql = ( - "SELECT *, (%(redacted)s) AS redacted FROM events" + "SELECT * FROM events" " WHERE outlier = 0 AND room_id = ? AND %(bounds)s" " ORDER BY topological_ordering %(order)s," " stream_ordering %(order)s %(limit)s" ) % { - "redacted": del_sql, "bounds": bounds, "order": order, "limit": limit_str } - rows = yield self._execute_and_decode( - sql, - *args - ) + def f(txn): + txn.execute(sql, args) - if rows: - topo = rows[-1]["topological_ordering"] - toke = rows[-1]["stream_ordering"] - if direction == 'b': - topo -= 1 - toke -= 1 - next_token = "t%s-%s" % (topo, toke) - else: - # TODO (erikj): We should work out what to do here instead. - next_token = to_key if to_key else from_key + rows = self.cursor_to_dict(txn) - events = yield self._parse_events(rows) + if rows: + topo = rows[-1]["topological_ordering"] + toke = rows[-1]["stream_ordering"] + if direction == 'b': + topo -= 1 + toke -= 1 + next_token = "t%s-%s" % (topo, toke) + else: + # TODO (erikj): We should work out what to do here instead. + next_token = to_key if to_key else from_key - defer.returnValue( - ( - events, - next_token + events = self._get_events_txn( + txn, + [r["event_id"] for r in rows], + get_prev_content=True ) - ) - @defer.inlineCallbacks + return events, next_token, + + return self.runInteraction("paginate_room_events", f) + def get_recent_events_for_room(self, room_id, limit, end_token, with_feedback=False): # TODO (erikj): Handle compressed feedback - del_sql = ( - "SELECT event_id FROM redactions WHERE redacts = events.event_id " - "LIMIT 1" - ) - sql = ( - "SELECT *, (%(redacted)s) AS redacted FROM events " + "SELECT * FROM events " "WHERE room_id = ? AND stream_ordering <= ? AND outlier = 0 " "ORDER BY topological_ordering DESC, stream_ordering DESC LIMIT ? " - ) % { - "redacted": del_sql, - } - - rows = yield self._execute_and_decode( - sql, - room_id, end_token, limit ) - rows.reverse() # As we selected with reverse ordering + def f(txn): + txn.execute(sql, (room_id, end_token, limit,)) - if rows: - topo = rows[0]["topological_ordering"] - toke = rows[0]["stream_ordering"] - start_token = "t%s-%s" % (topo, toke) + rows = self.cursor_to_dict(txn) - token = (start_token, end_token) - else: - token = (end_token, end_token) + rows.reverse() # As we selected with reverse ordering - events = yield self._parse_events(rows) + if rows: + topo = rows[0]["topological_ordering"] + toke = rows[0]["stream_ordering"] + start_token = "t%s-%s" % (topo, toke) - ret = (events, token) + token = (start_token, end_token) + else: + token = (end_token, end_token) - defer.returnValue(ret) + events = self._get_events_txn( + txn, + [r["event_id"] for r in rows], + get_prev_content=True + ) + + return events, token + + return self.runInteraction("get_recent_events_for_room", f) def get_room_events_max_id(self): return self.runInteraction( From 52d85190081044b9fbaf24869d652d3fe3c23e5d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 13:10:27 +0000 Subject: [PATCH 08/10] Don't do batching when getting events. --- synapse/storage/_base.py | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 9702ab4f4..9687222e7 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -446,43 +446,12 @@ class SQLBaseStore(object): if not event_ids: return [] - logger.debug("_get_events_txn called with %d events", len(event_ids)) - - if len(event_ids) > 50: - events = [] - n = 50 - split = [event_ids[i:i + n] for i in range(0, len(event_ids), n)] - for e_ids in split: - events.extend( - self._get_events_txn( - txn, e_ids, - check_redacted=check_redacted, - get_prev_content=get_prev_content, - ) - ) - return events - - logger.debug("_get_events_txn Fetching %d events", len(event_ids)) - - where_clause = " OR ".join(["e.event_id = ?" for _ in event_ids]) - - sql = ( - "SELECT internal_metadata, json, r.event_id FROM event_json as e " - "LEFT JOIN redactions as r ON e.event_id = r.redacts " - "WHERE %s" - ) % (where_clause,) - - txn.execute(sql, event_ids) - - res = txn.fetchall() - return [ - self._get_event_from_row_txn( - txn, r[0], r[1], r[2], - check_redacted=check_redacted, - get_prev_content=get_prev_content, + self._get_event_txn( + txn, event_id, + check_redacted=check_redacted, get_prev_content=get_prev_content ) - for r in res + for event_id in event_ids ] def _get_event_txn(self, txn, event_id, check_redacted=True, From 12819d5082ac73adc309428770c9270ba378c6e2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 13:12:30 +0000 Subject: [PATCH 09/10] Remove debug lines --- synapse/storage/state.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 9aeb0b406..fd6f1e3b0 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -58,8 +58,6 @@ class StateStore(SQLBaseStore): if group: groups.add(group) - logger.debug("Got groups: %s", groups) - res = {} for group in groups: state_ids = self._simple_select_onecol_txn( @@ -69,11 +67,6 @@ class StateStore(SQLBaseStore): retcol="event_id", ) - logger.debug( - "Got %d events for group %s", - len(state_ids), group - ) - state = self._get_events_txn(txn, state_ids) res[group] = state From af1c7c7808d297711e4b76b862c41a5ec2ca3a9a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 6 Jan 2015 13:13:17 +0000 Subject: [PATCH 10/10] PEP8 --- synapse/storage/_base.py | 6 ++++-- synapse/storage/stream.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 9687222e7..e799ac6c5 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -449,7 +449,8 @@ class SQLBaseStore(object): return [ self._get_event_txn( txn, event_id, - check_redacted=check_redacted, get_prev_content=get_prev_content + check_redacted=check_redacted, + get_prev_content=get_prev_content ) for event_id in event_ids ] @@ -473,7 +474,8 @@ class SQLBaseStore(object): internal_metadata, js, redacted = res return self._get_event_from_row_txn( - txn, internal_metadata, js, redacted, check_redacted=check_redacted, + txn, internal_metadata, js, redacted, + check_redacted=check_redacted, get_prev_content=get_prev_content, ) diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index c51f48945..bd3a411ea 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -142,7 +142,6 @@ class StreamStore(SQLBaseStore): limit=0, with_feedback=False): # TODO (erikj): Handle compressed feedback - current_room_membership_sql = ( "SELECT m.room_id FROM room_memberships as m " "INNER JOIN current_state_events as c ON m.event_id = c.event_id "