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
@@ -136,13 +136,6 @@ type FakeTelemetryService struct {
|
||||
arg2 *livekit.Room
|
||||
arg3 livekit.RoomEndReason
|
||||
}
|
||||
RoomIDChangedStub func(context.Context, livekit.RoomID, *livekit.Room)
|
||||
roomIDChangedMutex sync.RWMutex
|
||||
roomIDChangedArgsForCall []struct {
|
||||
arg1 context.Context
|
||||
arg2 livekit.RoomID
|
||||
arg3 *livekit.Room
|
||||
}
|
||||
RoomProjectReporterStub func(context.Context) roomobs.ProjectReporter
|
||||
roomProjectReporterMutex sync.RWMutex
|
||||
roomProjectReporterArgsForCall []struct {
|
||||
@@ -922,40 +915,6 @@ func (fake *FakeTelemetryService) RoomEndedArgsForCall(i int) (context.Context,
|
||||
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) RoomIDChanged(arg1 context.Context, arg2 livekit.RoomID, arg3 *livekit.Room) {
|
||||
fake.roomIDChangedMutex.Lock()
|
||||
fake.roomIDChangedArgsForCall = append(fake.roomIDChangedArgsForCall, struct {
|
||||
arg1 context.Context
|
||||
arg2 livekit.RoomID
|
||||
arg3 *livekit.Room
|
||||
}{arg1, arg2, arg3})
|
||||
stub := fake.RoomIDChangedStub
|
||||
fake.recordInvocation("RoomIDChanged", []interface{}{arg1, arg2, arg3})
|
||||
fake.roomIDChangedMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.RoomIDChangedStub(arg1, arg2, arg3)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) RoomIDChangedCallCount() int {
|
||||
fake.roomIDChangedMutex.RLock()
|
||||
defer fake.roomIDChangedMutex.RUnlock()
|
||||
return len(fake.roomIDChangedArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) RoomIDChangedCalls(stub func(context.Context, livekit.RoomID, *livekit.Room)) {
|
||||
fake.roomIDChangedMutex.Lock()
|
||||
defer fake.roomIDChangedMutex.Unlock()
|
||||
fake.RoomIDChangedStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) RoomIDChangedArgsForCall(i int) (context.Context, livekit.RoomID, *livekit.Room) {
|
||||
fake.roomIDChangedMutex.RLock()
|
||||
defer fake.roomIDChangedMutex.RUnlock()
|
||||
argsForCall := fake.roomIDChangedArgsForCall[i]
|
||||
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) RoomProjectReporter(arg1 context.Context) roomobs.ProjectReporter {
|
||||
fake.roomProjectReporterMutex.Lock()
|
||||
ret, specificReturn := fake.roomProjectReporterReturnsOnCall[len(fake.roomProjectReporterArgsForCall)]
|
||||
|
||||
Reference in New Issue
Block a user