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

Make AbstractChannel.outboundBuffer volatile. #5509

Closed
wants to merge 1 commit into from

Conversation

buchgr
Copy link
Contributor

@buchgr buchgr commented Jul 6, 2016

Motivation:

The field can be read from arbitrary threads via Channel.(isWritable()|bytesBeforeWritable()|bytesBeforeUnwritable()), WriteAndFlushTask.newInstance(), PendingWriteQueue, etc.

Modifications:

Make AbstractChannel.outboundBuffer volatile.

Result:

More correct in a concurrent use case.

Motivation:

The field can be read from arbitrary threads via Channel.(isWritable()|bytesBeforeWritable()|bytesBeforeUnwritable()), WriteAndFlushTask.newInstance(), PendingWriteQueue, etc.

Modifications:

Make AbstractChannel.outboundBuffer volatile.

Result:

More correct in a concurrent use case.
@buchgr
Copy link
Contributor Author

buchgr commented Jul 6, 2016

The problem has been reported on the gRPC issue tracker: grpc/grpc-java#2014

@normanmaurer normanmaurer self-assigned this Jul 6, 2016
@normanmaurer normanmaurer added this to the 4.0.39.Final milestone Jul 6, 2016
@normanmaurer
Copy link
Member

@buchgr good find...

Cherry-picked into 4.1 (0fbb791) and 4.0 (d4d8eba)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants