mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-20 19:10:45 +03:00
Revert "TEMPORARY Add more Measure blocks"
This reverts commit adfa0fded3
.
This commit is contained in:
parent
adfa0fded3
commit
1e1cf4bb9d
1 changed files with 57 additions and 63 deletions
|
@ -124,7 +124,7 @@ async def resolve_events_with_store(
|
|||
# Also fetch all auth events that appear in only some of the state sets'
|
||||
# auth chains.
|
||||
auth_diff = await _get_auth_chain_difference(
|
||||
room_id, state_sets, event_map, state_res_store, clock
|
||||
room_id, state_sets, event_map, state_res_store
|
||||
)
|
||||
|
||||
with Measure(clock, "rei_state_res:rews2_b"): # TODO temporary (rei)
|
||||
|
@ -284,7 +284,6 @@ async def _get_auth_chain_difference(
|
|||
state_sets: Sequence[StateMap[str]],
|
||||
unpersisted_events: Dict[str, EventBase],
|
||||
state_res_store: StateResolutionStore,
|
||||
clock: Clock,
|
||||
) -> Set[str]:
|
||||
"""Compare the auth chains of each state set and return the set of events
|
||||
that only appear in some, but not all of the auth chains.
|
||||
|
@ -316,7 +315,6 @@ async def _get_auth_chain_difference(
|
|||
# event IDs if they appear in the `unpersisted_events`. This is the intersection of
|
||||
# the event's auth chain with the events in `unpersisted_events` *plus* their
|
||||
# auth event IDs.
|
||||
with Measure(clock, "rei_state_res:rews2_a1"): # TODO temporary (rei)
|
||||
events_to_auth_chain: Dict[str, Set[str]] = {}
|
||||
for event in unpersisted_events.values():
|
||||
chain = {event.event_id}
|
||||
|
@ -335,7 +333,6 @@ async def _get_auth_chain_difference(
|
|||
#
|
||||
# Note: If there are no `unpersisted_events` (which is the common case), we can do a
|
||||
# much simpler calculation.
|
||||
with Measure(clock, "rei_state_res:rews2_a2"): # TODO temporary (rei)
|
||||
if unpersisted_events:
|
||||
# The list of state sets to pass to the store, where each state set is a set
|
||||
# of the event ids making up the state. This is similar to `state_sets`,
|
||||
|
@ -385,12 +382,9 @@ async def _get_auth_chain_difference(
|
|||
auth_difference_unpersisted_part = ()
|
||||
state_sets_ids = [set(state_set.values()) for state_set in state_sets]
|
||||
|
||||
with Measure(clock, "rei_state_res:rews2_a3"): # TODO temporary (rei)
|
||||
difference = await state_res_store.get_auth_chain_difference(
|
||||
room_id, state_sets_ids
|
||||
)
|
||||
|
||||
with Measure(clock, "rei_state_res:rews2_a4"): # TODO temporary (rei)
|
||||
difference.update(auth_difference_unpersisted_part)
|
||||
|
||||
return difference
|
||||
|
|
Loading…
Reference in a new issue