Skip to content

Conversation

@corhere
Copy link

@corhere corhere commented Apr 16, 2025

All broadcasts inserted into the TransmitLimitedQueue's B-tree data structure are supposed to be unique. If a new broadcast is inserted which happens to collide with a broadcast that is already present in the tree, the new one replaces the old one. This is not supposed to happen. But if a software bug, a cosmic ray or an id-generator rollover results in a collision happening anyway, the replaced broadcast is silently discarded without Finish() being called. Consequently, the application may leak resources or otherwise misbehave while it waits forever for a callback that is never invoked.

Call Finished() on broadcasts that have been replaced by a newly-inserted broadcast to mitigate the negative consequences of breaking the interface contract.

All broadcasts inserted into the TransmitLimitedQueue's B-tree data
structure are supposed to be unique. If a new broadcast is inserted
which happens to collide with a broadcast that is already present in the
tree, the new one replaces the old one. This is not supposed to happen.
But if a software bug, a cosmic ray or an id-generator rollover
results in a collision happening anyway, the replaced broadcast
is silently discarded without Finish() being called. Consequently, the
application may leak resources or otherwise misbehave while it waits
forever for a callback that is never invoked.

Call Finished() on broadcasts that have been replaced by a newly-
inserted broadcast to mitigate the negative consequences of breaking the
interface contract.
@corhere corhere requested a review from a team as a code owner April 16, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant