Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute_state_delta pulls out the full state when doing gappy syncs #13380

Open
matrixbot opened this issue Dec 20, 2023 · 0 comments
Open

compute_state_delta pulls out the full state when doing gappy syncs #13380

matrixbot opened this issue Dec 20, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 20, 2023

This issue has been migrated from #13380.


This causes spikes in memory usage when handling /sync requests.

The callstack:

  File "/home/erikj/synapse/synapse/handlers/sync.py", line 1562, in handle_room_entries
    await self._generate_room_entry(
  File "/home/erikj/synapse/synapse/handlers/sync.py", line 2072, in _generate_room_entry
    state = await self.compute_state_delta(
  File "/home/erikj/synapse/synapse/handlers/sync.py", line 966, in compute_state_delta
    state_at_previous_sync = await self.get_state_at(
  File "/home/erikj/synapse/synapse/handlers/sync.py", line 680, in get_state_at
    state = await self.get_state_after_event(
  File "/home/erikj/synapse/synapse/handlers/sync.py", line 639, in get_state_after_event
    state_ids = await self._state_storage_controller.get_state_ids_for_event(
  File "/home/erikj/synapse/synapse/storage/controllers/state.py", line 303, in get_state_ids_for_event
    state_map = await self.get_state_ids_for_events(
  File "/home/erikj/synapse/synapse/storage/controllers/state.py", line 253, in get_state_ids_for_events
    group_to_state = await self.stores.state._get_state_for_groups(
  File "/home/erikj/synapse/synapse/storage/databases/state/store.py", line 288, in _get_state_for_groups
    group_to_state_dict = await self._get_state_groups_from_groups(
  File "/home/erikj/synapse/synapse/storage/databases/state/store.py", line 173, in _get_state_groups_from_groups
@matrixbot matrixbot changed the title Dummy issue compute_state_delta pulls out the full state when doing gappy syncs Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant