You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Michał Kowalczuk (Created JIRA)" <ji...@apache.org> on 2011/10/05 09:57:34 UTC

[jira] [Created] (THRIFT-1371) Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris

Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris
----------------------------------------------------------------------

                 Key: THRIFT-1371
                 URL: https://issues.apache.org/jira/browse/THRIFT-1371
             Project: Thrift
          Issue Type: Improvement
          Components: C++ - Library
    Affects Versions: 0.7
            Reporter: Michał Kowalczuk


Solaris doesn't support setting SO_RCVTIMEO and SO_SNDTIMEO on socket using setsockopt(). I suggest using non-blocking socket and poll(). I've attached patch (generated by diff -crB) against thrift-0.7.0 that does that. The patch was tested in quite big production environment for more that one month and works well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (THRIFT-1371) Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris

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

Alexander Batyukov updated THRIFT-1371:
---------------------------------------

    Attachment: thrift-0.8.0-poll.patch
    
> Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-1371
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1371
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.7
>            Reporter: Michał Kowalczuk
>         Attachments: thrift-0.7.0-poll.patch, thrift-0.8.0-poll.patch
>
>
> Solaris doesn't support setting SO_RCVTIMEO and SO_SNDTIMEO on socket using setsockopt(). I suggest using non-blocking socket and poll(). I've attached patch (generated by diff -crB) against thrift-0.7.0 that does that. The patch was tested in quite big production environment for more that one month and works well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (THRIFT-1371) Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris

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

Michał Kowalczuk updated THRIFT-1371:
-------------------------------------

    Attachment: thrift-0.7.0-poll.patch

This patch does the following:
- removes setting timeouts directly on socket
- uses non blocking socket
- uses poll() (with timeout) before recv()/send()
- removes unused TSocket::peek()
                
> Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-1371
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1371
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.7
>            Reporter: Michał Kowalczuk
>         Attachments: thrift-0.7.0-poll.patch
>
>
> Solaris doesn't support setting SO_RCVTIMEO and SO_SNDTIMEO on socket using setsockopt(). I suggest using non-blocking socket and poll(). I've attached patch (generated by diff -crB) against thrift-0.7.0 that does that. The patch was tested in quite big production environment for more that one month and works well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira