HDDS-9370. Avoid copying ByteString in ByteStringCodec.#5377
HDDS-9370. Avoid copying ByteString in ByteStringCodec.#5377szetszwo merged 4 commits intoapache:masterfrom
Conversation
|
I think this change looks good, although there is one failing test which might be related. I have kicked it off again to see how it does on a retry. |
|
@sodonnel , thanks for taking a look! The test failure is related. It failed with an AssertError (but the |
What does this do for us eliminating the copy? Most requests will end up in the RocksDB or come out of the RocksDB I think, so does that mean most of the time we will need to make an extra copy of the buffer, or most of the time we will not with this change? |
When the backing buffer of the |
Oops, it should be -- The wrapping work for the cases that the backing buffer of the |
sodonnel
left a comment
There was a problem hiding this comment.
Change LGTM. I am not sure how often the wrapping will help or not as I am not sure where we have a miss-match between direct vs non-direct etc, but hopefully this will make a good difference.
|
@sodonnel , thanks a lot for reviewing this! |
…pache#5377) (cherry picked from 6272ebd) Change-Id: Ie20441dc30de7f3f2f0ae872bca13208d1fc0910
What changes were proposed in this pull request?
In
ByteStringCodec, we may wrap the ByteString instead of copying it in thetoCodecBuffer(..)method.What is the link to the Apache JIRA
HDDS-9370
How was this patch tested?
Added new tests.