azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Use Smaller ByteBuffers when Buffering BinaryData.fromFlux

Open alzimmermsft opened this issue 1 year ago • 1 comments

Description

Use smaller ByteBuffers when buffering BinaryData.fromFlux. Smaller buffers are better as they match the original input and don't require creating large byte arrays, and prevent OOME if the Flux<ByteBuffer> size is larger than Integer.MAX_VALUE.

All SDK Contribution checklist:

  • [x] The pull request does not introduce [breaking changes]
  • [x] CHANGELOG is updated for new features, bug fixes or other significant changes.
  • [x] I have read the contribution guidelines.

General Guidelines and Best Practices

  • [x] Title of the pull request is clear and informative.
  • [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • [x] Pull request includes test coverage for the included changes.

alzimmermsft avatar Sep 22 '22 20:09 alzimmermsft

API change check

API changes are not detected in this pull request.

azure-sdk avatar Sep 22 '22 20:09 azure-sdk