Skip to content

Commit

Permalink
Merge pull request #380 from matrix-org/kegan/log-state-invalidate
Browse files Browse the repository at this point in the history
Log information about the invalidated room
  • Loading branch information
kegsay authored Nov 21, 2023
2 parents 62d3798 + d4f546f commit a8fb526
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync3/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@ func (h *SyncLiveHandler) OnInvalidateRoom(p *pubsub.V2InvalidateRoom) {
if h.destroyedConns != nil {
h.destroyedConns.Add(float64(destroyed))
}
// invalidations are rare and dangerous if we get it wrong, so log information about it.
logger.Info().
Str("room_id", p.RoomID).Int("joins", len(joins)).Int("invites", len(invites)).Int("leaves", len(leaves)).
Int("del_user_caches", len(unregistered)).Int("conns_destroyed", destroyed).Msg("OnInvalidateRoom")
}

func parseIntFromQuery(u *url.URL, param string) (result int64, err *internal.HandlerError) {
Expand Down

0 comments on commit a8fb526

Please sign in to comment.