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

Using DataBuffer::write results in IndexOutOfBoundsException [SPR-16365] #20912

Closed
spring-issuemaster opened this issue Jan 11, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jan 11, 2018

Arjen Poutsma opened SPR-16365 and commented

Using DataBuffer.write(DataBuffer[] databuffer) in a Flux.reduce aggregation result in a IndexOutOfBoundsException when running on Netty. The reason for this is that the initial buffer does not have enough capacity to contain the data of all subsequent buffers.


Issue Links:

  • #20898 Use of CompositeByteBuf in NettyDataBuffer results in IllegalReferenceCountException

Referenced from: commits 0befc60, e39bf87, 67e7c78, 384a399

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 12, 2018

Arjen Poutsma commented

Fixed in 384a399 and 67e7c78.

Fixed by introducing Mono<DataBuffer> compose(Publisher<DataBuffer>). For Netty, this uses a CompositeByteBuf to compose the given data buffers into one. For the DefaultDataBuffer, this writes all data into one buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.