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

Prevent double release in TcpTransport if send listener throws an exception #20880

Merged
merged 3 commits into from
Oct 12, 2016

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Oct 12, 2016

today we might release a bytes array more than once if the send listener
throws an exception but already has released the array. Yet, this is already fixed
in the BytesArray class we use in production to ensure 3rd party users don't release
twice but our mocks still enforce it.

see this build for reference https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=debian/95/consoleFull

…eption

today we might release a bytes array more than once if the send listener
throws an execption but already has released the array. Yet, this is already fixed
in the BytesArray class we use in production to ensure 3rd party users don't release
twice but our mocks still enforce it.
@s1monw s1monw added >bug review :Distributed/Network Http and internode communication implementations v6.0.0-alpha1 v5.1.1 labels Oct 12, 2016
Copy link
Contributor

@bleskes bleskes left a comment

Choose a reason for hiding this comment

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

LGTM. nasty layers of closing, releasing and async call backs ;)

@s1monw s1monw merged commit f96ea58 into elastic:master Oct 12, 2016
@s1monw s1monw deleted the protect_rpbr_close branch October 12, 2016 10:53
s1monw added a commit that referenced this pull request Oct 12, 2016
…eption (#20880)

today we might release a bytes array more than once if the send listener
throws an exception but already has released the array. Yet, this is already fixed
in the BytesArray class we use in production to ensure 3rd party users don't release
twice but our mocks still enforce it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Network Http and internode communication implementations v5.1.1 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants