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

room_stats_current.current_state_events database table is not updated when the server is no longer in the room #17457

Open
MadLittleMods opened this issue Jul 19, 2024 · 0 comments

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Jul 19, 2024

When a server is no longer in a room, the current_state_events table is cleared for that room_id. But we never update the room_stats_current table -> current_state_events to reflect this state.

The room_stats_current.joined_members does get updated 0 though.

Reproduction instructions

  1. Create a room
  2. Notice the current_state_events count is > 0 (probably 7) in the database: psql synapse -> SELECT * FROM room_stats_current WHERE room_id = '!my-room'
  3. Leave the room (no one else should be left in the room) which will cause the server to no longer be in the room
  4. The current_state_events will be cleared out for that room (0 rows, expected ✅ ): psql synapse -> SELECT * FROM current_state_events WHERE room_id = '!my-room'
  5. Notice the current_state_events count is still 7 in the database (unexpected ❌): psql synapse -> SELECT * FROM room_stats_current WHERE room_id = '!my-room'
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

2 participants