Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver: periodically prune SsrcStates from UDP Rx's decoder_map #133

Closed
FelixMcFelix opened this issue Jun 6, 2022 · 0 comments
Closed
Labels
driver Relates to the driver or one of its sub-tasks. enhancement New feature or request fix Fixes a bug or error

Comments

@FelixMcFelix
Copy link
Member

Currently, we don't prune old OpusDecoders from calls in response to either long timeouts or to disconnect events. As each of these is quite large, this can add up in long calls over many servers.

Each SsrcState should ideally be removed once a user leaves the call, or after a configurable timeout.

@FelixMcFelix FelixMcFelix added enhancement New feature or request driver Relates to the driver or one of its sub-tasks. fix Fixes a bug or error labels Jun 6, 2022
@FelixMcFelix FelixMcFelix added this to the v0.3.0: Nightingale milestone Jun 6, 2022
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this issue Aug 8, 2022
`SsrcState` objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using `cargo make ready` and via `examples/serenity/voice_receive/`.

Closes serenity-rs#133
FelixMcFelix added a commit that referenced this issue Aug 8, 2022
`SsrcState` objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using `cargo make ready` and via `examples/serenity/voice_receive/`.

Closes #133
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this issue Nov 20, 2023
`SsrcState` objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using `cargo make ready` and via `examples/serenity/voice_receive/`.

Closes serenity-rs#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Relates to the driver or one of its sub-tasks. enhancement New feature or request fix Fixes a bug or error
Projects
None yet
Development

No branches or pull requests

1 participant