Skip to content

Drop messages where channel does not exist#914

Merged
AndyTWF merged 2 commits intomainfrom
913-released-channels-re-creating
Feb 7, 2023
Merged

Drop messages where channel does not exist#914
AndyTWF merged 2 commits intomainfrom
913-released-channels-re-creating

Conversation

@AndyTWF
Copy link
Contributor

@AndyTWF AndyTWF commented Feb 6, 2023

At the moment, if a message is received and a channel does not exist the channel is created (via channels.get) to process the message.

This can lead to issues with channels.release, which also detaches the channel after removing it from the channel map. If the timing is unfortunate, then the DETACH message will come back and re-create the channel, meaning it cannot be recreated afresh later.

This change fixes the issues by dropping any messages that are received for a non existent channel and logs the fact that this has happened.

Fixes #913

At the moment, if a message is received and a channel does not exist
the channel is created (via channels.get) to process the message.

This can lead to issues with channels.release, which also detaches the channel
after removing it from the channel map. If the timing is unfortunate,
then the DETACH message will come back and re-create the channel, meaning
it cannot be recreated afresh later.

This change fixes the issues by dropping any messages that are received for
a non existent channel and logs the fact that this has happened.

Fixes #913
@github-actions github-actions bot temporarily deployed to staging/pull/914/javadoc February 6, 2023 11:15 Inactive
@AndyTWF AndyTWF marked this pull request as ready for review February 6, 2023 13:49
@AndyTWF AndyTWF requested review from QuintinWillison, ikbalkaya and paddybyers and removed request for QuintinWillison February 6, 2023 13:53
Copy link
Contributor

@ikbalkaya ikbalkaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good overall. I have made some requests that will hopefully improve the code.

Copy link
Member

@paddybyers paddybyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@AndyTWF AndyTWF merged commit bd35085 into main Feb 7, 2023
@AndyTWF AndyTWF deleted the 913-released-channels-re-creating branch February 7, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Released channel re-added to the channel map after DETACHED message

3 participants