You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2016/03/03 18:35:18 UTC

[jira] [Resolved] (CALCITE-1094) Replace AvaticaUtils.readFully(InputStream)'s use of ByteArrayOutputStream

     [ https://issues.apache.org/jira/browse/CALCITE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Elser resolved CALCITE-1094.
---------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: next)
                   1.7.0

Fixed in https://git1-us-west.apache.org/repos/asf?p=calcite.git;a=commit;h=1d3a26dfac17fea458402a637449007dc095bced

> Replace AvaticaUtils.readFully(InputStream)'s use of ByteArrayOutputStream
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-1094
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1094
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: avatica
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>             Fix For: 1.7.0
>
>
> I remember reading a ticket a long time ago (ACCUMULO-1000) about how use of ByteArrayOutputStream can be sub-optimal for low-latency calls due to the synchronization around the write method.
> While ByteArrayOutputStream gets the job done, an unsynchronized buffer is sufficient for reading the bytes of the HTTP body off of the wire and into a byte array. We don't need the synchronization guarantees that come with BAOS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)