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

Commit

Permalink
add some logging to the rooms stats updates, to try to track down a f…
Browse files Browse the repository at this point in the history
…laky test
  • Loading branch information
richvdh committed Oct 4, 2019
1 parent 13c4345 commit 3853bad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
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

0 comments on commit 3853bad

Please sign in to comment.