telemetry: drop the stats worker re-key path (#4918)
Reverts #4816. Since livekit/cloud#4747 a room re-key closes every participant's stats worker under the old room id and opens a new one under the new id (LeaveSession/JoinSession, #4917), so RoomIDChanged and reKeyRoom have nothing left to move, and with them go the sealed stats batches, SetRoom, ForceClose and the reference hand-over that only the re-key collision case needed. The worker map goes back to a flat (room, participant) key. The guard fixes that landed after #4816 (#4817, #4856, #4860) are kept. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
dc138b2bf0
commit
9a6c187afd
@@ -184,18 +184,6 @@ func (t *telemetryService) ParticipantResumed(
|
||||
})
|
||||
}
|
||||
|
||||
// RoomIDChanged re-keys the room's stats workers.
|
||||
//
|
||||
// NOTE: this shares the queue with the stats and participant events it races with, so
|
||||
// ops raised before the id changed (carrying `prevRoomID`) are applied before the
|
||||
// re-key and ops raised after it (carrying the new id) are applied after. Callers
|
||||
// should raise this as soon as the room starts reporting the new id.
|
||||
func (t *telemetryService) RoomIDChanged(ctx context.Context, prevRoomID livekit.RoomID, room *livekit.Room) {
|
||||
t.enqueue(func() {
|
||||
t.reKeyRoom(prevRoomID, livekit.RoomID(room.Sid), livekit.RoomName(room.Name))
|
||||
})
|
||||
}
|
||||
|
||||
func (t *telemetryService) ParticipantLeft(ctx context.Context,
|
||||
room *livekit.Room,
|
||||
participant *livekit.ParticipantInfo,
|
||||
|
||||
Reference in New Issue
Block a user