You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/01/13 06:26:02 UTC

[GitHub] [druid] clintropolis opened a new pull request #12150: fix array type strategy write size tracking

clintropolis opened a new pull request #12150:
URL: https://github.com/apache/druid/pull/12150


   ### Description
   This PR fixes a bug introduced in #11888 for the ARRAY type strategy write method, where the size tracking of remaining buffer space had a silly math bug that made size tracking go wildly wrong the longer the array was. I was incorrectly subtracting the total so far bytes written for the whole array, rather than only the bytes for each element written, so it "used" up the space far far quicker than the actual number of bytes written 😛 
   
   I added a test, which fails prior to the changes in this PR, that writes an array that is nearly the size of the test buffer to ensure that size tracking allows the full use of the buffer.
   
   I also fixed up a couple of spots that mutate buffer position in `NullableTypeStrategy` that should've been wrapped in a try..finally, so now they are.
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [x] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s merged pull request #12150: fix array type strategy write size tracking

Posted by GitBox <gi...@apache.org>.
suneet-s merged pull request #12150:
URL: https://github.com/apache/druid/pull/12150


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org