Log when we go slow

This commit is contained in:
Kegan Dougal 2023-07-14 10:29:21 +01:00
parent 2d773ab776
commit de1cf98df3

View File

@ -861,6 +861,7 @@ func (s *Storage) LatestEventNIDInRooms(roomIDs []string, highestNID int64) (roo
if len(slowRooms) == 0 {
return nil // no work to do
}
logger.Warn().Int("slow_rooms", len(slowRooms)).Msg("LatestEventNIDInRooms: pos value provided is far behind the database copy, performance degraded")
slowRoomToLatestNIDs, err := s.EventsTable.LatestEventNIDInRooms(txn, slowRooms, highestNID)
if err != nil {