You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Matt Ronge (JIRA)" <ji...@apache.org> on 2009/07/02 05:16:47 UTC

[jira] Created: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

A struct greater than certain size will cause an exception to be thrown and the data won't be written
-----------------------------------------------------------------------------------------------------

                 Key: THRIFT-533
                 URL: https://issues.apache.org/jira/browse/THRIFT-533
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (Cocoa)
            Reporter: Matt Ronge


When writing a chunk of data greater than a certain size (like greater than a
couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
The existing code detects this and throws an exception, so it is impossible
to send a struct greater than a certain size. 

Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

Posted by "Andrew McGeachie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew McGeachie resolved THRIFT-533.
-------------------------------------

    Resolution: Fixed

Commited!  Thanks other Matt!

> A struct greater than certain size will cause an exception to be thrown and the data won't be written
> -----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>            Reporter: Matt Ronge
>            Assignee: Andrew McGeachie
>         Attachments: transport.patch, transport_2.diff
>
>
> When writing a chunk of data greater than a certain size (like greater than a
> couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
> The existing code detects this and throws an exception, so it is impossible
> to send a struct greater than a certain size. 
> Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

Posted by "Andrew McGeachie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew McGeachie reassigned THRIFT-533:
---------------------------------------

    Assignee: Andrew McGeachie

> A struct greater than certain size will cause an exception to be thrown and the data won't be written
> -----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>            Reporter: Matt Ronge
>            Assignee: Andrew McGeachie
>         Attachments: transport.patch
>
>
> When writing a chunk of data greater than a certain size (like greater than a
> couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
> The existing code detects this and throws an exception, so it is impossible
> to send a struct greater than a certain size. 
> Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

Posted by "Matt Ronge (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Ronge updated THRIFT-533:
------------------------------

    Component/s:     (was: Compiler (Cocoa))
                 Library (Cocoa)

> A struct greater than certain size will cause an exception to be thrown and the data won't be written
> -----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>            Reporter: Matt Ronge
>         Attachments: transport.patch
>
>
> When writing a chunk of data greater than a certain size (like greater than a
> couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
> The existing code detects this and throws an exception, so it is impossible
> to send a struct greater than a certain size. 
> Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

Posted by "Matt Ronge (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Ronge updated THRIFT-533:
------------------------------

    Attachment: transport_2.diff

This latest patch fixes a bug in my previous code that would cause the stream to terminate when a empty string was present. It would try to write out zero bytes and mess up. Now it won't attempt to write if there byte length is zero

> A struct greater than certain size will cause an exception to be thrown and the data won't be written
> -----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Cocoa)
>            Reporter: Matt Ronge
>            Assignee: Andrew McGeachie
>         Attachments: transport.patch, transport_2.diff
>
>
> When writing a chunk of data greater than a certain size (like greater than a
> couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
> The existing code detects this and throws an exception, so it is impossible
> to send a struct greater than a certain size. 
> Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-533) A struct greater than certain size will cause an exception to be thrown and the data won't be written

Posted by "Matt Ronge (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Ronge updated THRIFT-533:
------------------------------

    Attachment: transport.patch

> A struct greater than certain size will cause an exception to be thrown and the data won't be written
> -----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-533
>                 URL: https://issues.apache.org/jira/browse/THRIFT-533
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Cocoa)
>            Reporter: Matt Ronge
>         Attachments: transport.patch
>
>
> When writing a chunk of data greater than a certain size (like greater than a
> couple hundred kilobytes), NSOutputStream can't write the data in one chunk.
> The existing code detects this and throws an exception, so it is impossible
> to send a struct greater than a certain size. 
> Attached is a patch which checks if all the data has been sent, if not it loops until finished.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.