Apply suggestions from code review
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>pull/8476/head
parent
3613071e44
commit
1a49e23555
|
|
@ -2968,7 +2968,7 @@ class FederationHandler(BaseHandler):
|
|||
assert self.storage.persistence
|
||||
|
||||
# Note that this returns the events that were persisted, which may not be
|
||||
# the same as we passed in if some were deduplicated due transaction IDs.
|
||||
# the same as were passed in if some were deduplicated due to transaction IDs.
|
||||
events, max_stream_token = await self.storage.persistence.persist_events(
|
||||
event_and_contexts, backfilled=backfilled
|
||||
)
|
||||
|
|
|
|||
|
|
@ -310,9 +310,9 @@ class EventsPersistenceStorage:
|
|||
return replaced_events
|
||||
|
||||
# Check if any of the events have a transaction ID that has already been
|
||||
# persitsed, and if so we don't persist again.
|
||||
# persisted, and if so we don't persist it again.
|
||||
#
|
||||
# We should have checked this a long time before we get here, but its
|
||||
# We should have checked this a long time before we get here, but it's
|
||||
# possible that different send event requests race in such a way that
|
||||
# they both pass the earlier checks.
|
||||
replaced_events = await self.main_store.get_already_persisted_events(
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class EventCreationTestCase(unittest.HomeserverTestCase):
|
|||
"sender": requester.user.to_string(),
|
||||
"content": {"msgtype": "m.text", "body": "Hello"},
|
||||
},
|
||||
token_id=4957834,
|
||||
token_id=token_id,
|
||||
txn_id=txn_id,
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue