Skip to content

Commit

Permalink
Invalidate: bail if we fail to fetch members
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Nov 7, 2023
1 parent 9ad93b8 commit 041965f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sync3/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 844,6 @@ func (h *SyncLiveHandler) OnInvalidateRoom(p *pubsub.V2InvalidateRoom) {
involvedUsers = append(involvedUsers, invites...)
involvedUsers = append(involvedUsers, leaves...)

// 2. Reload the joined-room tracker.
if err != nil {
hub := internal.GetSentryHubFromContextOrDefault(ctx)
hub.WithScope(func(scope *sentry.Scope) {
Expand All @@ -856,8 855,10 @@ func (h *SyncLiveHandler) OnInvalidateRoom(p *pubsub.V2InvalidateRoom) {
logger.Err(err).
Str("room_id", p.RoomID).
Msg("Failed to fetch members after cache invalidation")
return
}

// 2. Reload the joined-room tracker.
h.Dispatcher.OnInvalidateRoom(p.RoomID, joins, invites)

// 3. Destroy involved users' caches.
Expand Down

0 comments on commit 041965f

Please sign in to comment.