diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 5e26af1a1a..6b9cdac9b5 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -129,7 +129,7 @@ class DeviceWorkerHandler(BaseHandler): tracked_users = set(users_who_share_room) # Always tell the user about their own devices - #tracked_users.add(user_id) + tracked_users.add(user_id) changed = yield self.store.get_users_whose_devices_changed( from_token.device_list_key, tracked_users @@ -444,6 +444,7 @@ class DeviceHandler(DeviceWorkerHandler): """Notify that a user's device(s) has changed. Pokes the notifier, and remote servers if the user is local. """ + logger.info("get_users_who_share_room... called from notify_device_update") users_who_share_room = yield self.store.get_users_who_share_room_with_user( user_id ) diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 5cbefae177..3ceb3d81cd 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -1098,6 +1098,7 @@ class PresenceEventSource(object): users_interested_in = set() users_interested_in.add(user_id) # So that we receive our own presence + logger.info("get_users_who_share_room... _get_interested_in") users_who_share_room = await self.store.get_users_who_share_room_with_user( user_id, on_invalidate=cache_context.invalidate ) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index ed4e2961c8..bec0e7c5d1 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -308,12 +308,14 @@ class SyncHandler(object): if timeout == 0 or since_token is None or full_state: # we are going to return immediately, so don't bother calling # notifier.wait_for_events. + logger.info("_wait_for_sync_for_user1") result = await self.current_sync_for_user( sync_config, since_token, full_state=full_state ) else: def current_sync_callback(before_token, after_token): + logger.info("_wait_for_sync_for_user2") return self.current_sync_for_user(sync_config, since_token) result = await self.notifier.wait_for_events( @@ -340,6 +342,7 @@ class SyncHandler(object): ) -> SyncResult: """Get the sync for client needed to match what the server has now. """ + logger.info("current_sync_for_user") return await self.generate_sync_result(sync_config, since_token, full_state) async def push_rules_for_user(self, user: UserID) -> JsonDict: @@ -1139,6 +1142,7 @@ class SyncHandler(object): # room with by looking at all users that have left a room plus users # that were in a room we've left. + logger.info("get_users_who_share_room... called from _generate_sync_entry") users_who_share_room = await self.store.get_users_who_share_room_with_user( user_id ) @@ -1148,7 +1152,7 @@ class SyncHandler(object): # rooms) and taking a copy of the set is relatively expensive. if user_id not in users_who_share_room: users_who_share_room = set(users_who_share_room) - #users_who_share_room.add(user_id) + users_who_share_room.add(user_id) tracked_users = users_who_share_room diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index 8fa68dd37f..219ab15192 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -171,6 +171,7 @@ class SyncRestServlet(RestServlet): user.to_string(), affect_presence=affect_presence ) with context: + logger.info("Sync servlet") sync_result = await self.sync_handler.wait_for_sync_for_user( sync_config, since_token=since_token,