Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

add some logging to the rooms stats updates, to try to track down a flaky test #6167

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/6167.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add some logging to the rooms stats updates, to try to track down a flaky test.
1 change: 1 addition & 0 deletions synapse/handlers/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def _handle_deltas(self, deltas):
room_state["guest_access"] = event_content.get("guest_access")

for room_id, state in room_to_state_updates.items():
logger.info("Updating room_stats_state for %s: %s", room_id, state)
yield self.store.update_room_state(room_id, state)

return room_to_stats_deltas, user_to_stats_deltas
3 changes: 3 additions & 0 deletions synapse/storage/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ def bulk_update_stats_delta(self, ts, updates, stream_id):
def _bulk_update_stats_delta_txn(txn):
for stats_type, stats_updates in updates.items():
for stats_id, fields in stats_updates.items():
logger.info(
"Updating %s stats for %s: %s", stats_type, stats_id, fields
)
self._update_stats_delta_txn(
txn,
ts=ts,
Expand Down