You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2008/09/03 20:13:44 UTC

[jira] Created: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

IPC client does not need to be synchronized on the output stream when a connection is closed
--------------------------------------------------------------------------------------------

                 Key: HADOOP-4062
                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
             Project: Hadoop Core
          Issue Type: Improvement
          Components: ipc
    Affects Versions: 0.18.0
            Reporter: Hairong Kuang
            Assignee: Hairong Kuang
             Fix For: 0.19.0


Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628444#action_12628444 ] 

Raghu Angadi commented on HADOOP-4062:
--------------------------------------

Can you briefly describe the case where one thread is trying to close and other threads are still sending requests? 

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632862#action_12632862 ] 

Hairong Kuang commented on HADOOP-4062:
---------------------------------------

Here was the result of ant test-patch:

     [exec] +1 overall.  

     [exec]     +1 @author.  The patch does not contain any @author tags.

     [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.

     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.

     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.



> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch, closeSync1.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Updated: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

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

Hairong Kuang updated HADOOP-4062:
----------------------------------

    Hadoop Flags: [Reviewed]
          Status: Patch Available  (was: Open)

Thanks Raghu for the review. This is possible when a client is stopped while application are sending requests.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630244#action_12630244 ] 

Hadoop QA commented on HADOOP-4062:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12389450/closeSync.patch
  against trunk revision 693705.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no tests are needed for this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3244/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3244/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3244/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3244/console

This message is automatically generated.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Updated: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

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

Hairong Kuang updated HADOOP-4062:
----------------------------------

    Attachment: closeSync1.patch

The new findbug is introduced on purpose. So I mark it as a findbug excluded filter.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch, closeSync1.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633325#action_12633325 ] 

Hudson commented on HADOOP-4062:
--------------------------------

Integrated in Hadoop-trunk #611 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/611/])

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch, closeSync1.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Updated: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

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

Hairong Kuang updated HADOOP-4062:
----------------------------------

    Attachment: closeSync.patch

This patch removes the synchronization on "out" in Client.Connection.close(). Additionally it does the following:
1. Does not set in and out to be null after they are closed;
2. As a result of 1, no need to set "out" to be an atomic reference;
3. Removes a confusing exception when a client is stopped but there is no pending RPC.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630010#action_12630010 ] 

Raghu Angadi commented on HADOOP-4062:
--------------------------------------

+1.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Commented: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630416#action_12630416 ] 

Hairong Kuang commented on HADOOP-4062:
---------------------------------------

I removed the atomic reference on out because this patch does not set "out" to be null when a connection is closed. So there will not be NPE.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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


[jira] Updated: (HADOOP-4062) IPC client does not need to be synchronized on the output stream when a connection is closed

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

Hairong Kuang updated HADOOP-4062:
----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I've committed this.

> IPC client does not need to be synchronized on the output stream when a connection is closed
> --------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4062
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4062
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.18.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.19.0
>
>         Attachments: closeSync.patch, closeSync1.patch
>
>
> Currently when a connection on the client side is closed, the close method is synchronized on the output stream. The synchronization is not necessary and has introduced a side effect that the socket can not be closed immediately when meanwhile applications are sending large requests.

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