Only send RDATA for instance local events. (#8496)

When pulling events out of the DB to send over replication we were not
filtering by instance name, and so we were sending events for other
instances.
This commit is contained in:
Erik Johnston 2020-10-09 13:10:33 +01:00 committed by GitHub
parent fe0f4a3591
commit 5009ffcaa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 25 deletions

View file

@ -155,7 +155,7 @@ class EventsStream(Stream):
# now we fetch up to that many rows from the events table
event_rows = await self._store.get_all_new_forward_event_rows(
from_token, current_token, target_row_count
instance_name, from_token, current_token, target_row_count
) # type: List[Tuple]
# we rely on get_all_new_forward_event_rows strictly honouring the limit, so
@ -180,7 +180,7 @@ class EventsStream(Stream):
upper_limit,
state_rows_limited,
) = await self._store.get_all_updated_current_state_deltas(
from_token, upper_limit, target_row_count
instance_name, from_token, upper_limit, target_row_count
)
limited = limited or state_rows_limited
@ -189,7 +189,7 @@ class EventsStream(Stream):
# not to bother with the limit.
ex_outliers_rows = await self._store.get_ex_outlier_stream_rows(
from_token, upper_limit
instance_name, from_token, upper_limit
) # type: List[Tuple]
# we now need to turn the raw database rows returned into tuples suitable