room_stats_current.current_state_events
database table is not updated when the server is no longer in the room
#17457
Labels
When a server is no longer in a room, the
current_state_events
table is cleared for thatroom_id
. But we never update theroom_stats_current
table ->current_state_events
to reflect this state.The
room_stats_current.joined_members
does get updated0
though.Reproduction instructions
current_state_events
count is > 0 (probably7
) in the database:psql synapse
->SELECT * FROM room_stats_current WHERE room_id = '!my-room'
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'
current_state_events
count is still7
in the database (unexpected ❌):psql synapse
->SELECT * FROM room_stats_current WHERE room_id = '!my-room'
The text was updated successfully, but these errors were encountered: