mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge pull request #1767 from matrix-org/matthew/resolve_state_group_logging
log call paths for resolve_state_group
This commit is contained in:
commit
dafd50d178
@ -290,6 +290,7 @@ class Auth(object):
|
|||||||
with Measure(self.clock, "check_host_in_room"):
|
with Measure(self.clock, "check_host_in_room"):
|
||||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||||
|
|
||||||
|
logger.info("calling resolve_state_groups from check_host_in_room");
|
||||||
entry = yield self.state.resolve_state_groups(
|
entry = yield self.state.resolve_state_groups(
|
||||||
room_id, latest_event_ids
|
room_id, latest_event_ids
|
||||||
)
|
)
|
||||||
|
@ -591,6 +591,7 @@ class FederationHandler(BaseHandler):
|
|||||||
|
|
||||||
event_ids = list(extremities.keys())
|
event_ids = list(extremities.keys())
|
||||||
|
|
||||||
|
logger.info("calling resolve_state_groups in _maybe_backfill")
|
||||||
states = yield preserve_context_over_deferred(defer.gatherResults([
|
states = yield preserve_context_over_deferred(defer.gatherResults([
|
||||||
preserve_fn(self.state_handler.resolve_state_groups)(room_id, [e])
|
preserve_fn(self.state_handler.resolve_state_groups)(room_id, [e])
|
||||||
for e in event_ids
|
for e in event_ids
|
||||||
|
@ -123,6 +123,7 @@ class StateHandler(object):
|
|||||||
if not latest_event_ids:
|
if not latest_event_ids:
|
||||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||||
|
|
||||||
|
logger.info("calling resolve_state_groups from get_current_state");
|
||||||
ret = yield self.resolve_state_groups(room_id, latest_event_ids)
|
ret = yield self.resolve_state_groups(room_id, latest_event_ids)
|
||||||
state = ret.state
|
state = ret.state
|
||||||
|
|
||||||
@ -147,6 +148,7 @@ class StateHandler(object):
|
|||||||
if not latest_event_ids:
|
if not latest_event_ids:
|
||||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||||
|
|
||||||
|
logger.info("calling resolve_state_groups from get_current_state_ids");
|
||||||
ret = yield self.resolve_state_groups(room_id, latest_event_ids)
|
ret = yield self.resolve_state_groups(room_id, latest_event_ids)
|
||||||
state = ret.state
|
state = ret.state
|
||||||
|
|
||||||
@ -158,6 +160,7 @@ class StateHandler(object):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_current_user_in_room(self, room_id, latest_event_ids=None):
|
def get_current_user_in_room(self, room_id, latest_event_ids=None):
|
||||||
|
logger.info("calling resolve_state_groups from get_current_user_in_room");
|
||||||
if not latest_event_ids:
|
if not latest_event_ids:
|
||||||
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
|
||||||
entry = yield self.resolve_state_groups(room_id, latest_event_ids)
|
entry = yield self.resolve_state_groups(room_id, latest_event_ids)
|
||||||
@ -223,6 +226,7 @@ class StateHandler(object):
|
|||||||
context.prev_state_events = []
|
context.prev_state_events = []
|
||||||
defer.returnValue(context)
|
defer.returnValue(context)
|
||||||
|
|
||||||
|
logger.info("calling resolve_state_groups from compute_event_context");
|
||||||
if event.is_state():
|
if event.is_state():
|
||||||
entry = yield self.resolve_state_groups(
|
entry = yield self.resolve_state_groups(
|
||||||
event.room_id, [e for e, _ in event.prev_events],
|
event.room_id, [e for e, _ in event.prev_events],
|
||||||
|
@ -393,8 +393,8 @@ class RoomMemberStore(SQLBaseStore):
|
|||||||
@cachedInlineCallbacks(num_args=2, cache_context=True)
|
@cachedInlineCallbacks(num_args=2, cache_context=True)
|
||||||
def _get_joined_users_from_context(self, room_id, state_group, current_state_ids,
|
def _get_joined_users_from_context(self, room_id, state_group, current_state_ids,
|
||||||
cache_context, event=None):
|
cache_context, event=None):
|
||||||
# We don't use `state_group`, its there so that we can cache based
|
# We don't use `state_group`, it's there so that we can cache based
|
||||||
# on it. However, its important that its never None, since two current_state's
|
# on it. However, it's important that it's never None, since two current_states
|
||||||
# with a state_group of None are likely to be different.
|
# with a state_group of None are likely to be different.
|
||||||
# See bulk_get_push_rules_for_room for how we work around this.
|
# See bulk_get_push_rules_for_room for how we work around this.
|
||||||
assert state_group is not None
|
assert state_group is not None
|
||||||
|
@ -384,7 +384,7 @@ class StateStore(SQLBaseStore):
|
|||||||
# We did this before by getting the list of group ids, and
|
# We did this before by getting the list of group ids, and
|
||||||
# then passing that list to sqlite to get latest event for
|
# then passing that list to sqlite to get latest event for
|
||||||
# each (type, state_key). However, that was terribly slow
|
# each (type, state_key). However, that was terribly slow
|
||||||
# without the right indicies (which we can't add until
|
# without the right indices (which we can't add until
|
||||||
# after we finish deduping state, which requires this func)
|
# after we finish deduping state, which requires this func)
|
||||||
args = [next_group]
|
args = [next_group]
|
||||||
if types:
|
if types:
|
||||||
|
Loading…
Reference in New Issue
Block a user