zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackie Chang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-337) improve logging in leader election lookForLeader method when address resolution fails
Date Thu, 26 Sep 2013 22:34:03 GMT

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

Jackie Chang updated ZOOKEEPER-337:
-----------------------------------

    Description: 
leader election has the following code:

                requestPacket.setSocketAddress(server.addr);
                LOG.info("Server address: " + server.addr);

this should be switched to have the info log first, set sock addr second.

The reason for this is that if the setSocketAddress fails SUN is not printing the address
used. As a result it's verify difficult to debug this issue.

If we log the server address first, then if the setsockaddr fails we'll see both the address
of the server and the exception detail (right now we just see the exception detail which does
not include the invlaid address in invalidaddressexception).


  was:
leader election has the following code:

                requestPacket.setSocketAddress(server.addr);
                LOG.info("Server address: " + server.addr);

this should be switched to have the info log first, set sock addr second.

The reason for this is that if the setSocketAddress fails sun is not printing the address
used. As a result it's verfy difficult to debug this issue.

If we log the server address first, then if the setsockaddr fails we'll see both the address
of the server and the exception detail (right now we just see the exception detail which does
not include the invlaid address in invalidaddressexception).


    
> improve logging in leader election lookForLeader method when address resolution fails
> -------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-337
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-337
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: quorum
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-337.patch, ZOOKEEPER-337.patch, ZOOKEEPER-337.patch
>
>
> leader election has the following code:
>                 requestPacket.setSocketAddress(server.addr);
>                 LOG.info("Server address: " + server.addr);
> this should be switched to have the info log first, set sock addr second.
> The reason for this is that if the setSocketAddress fails SUN is not printing the address
used. As a result it's verify difficult to debug this issue.
> If we log the server address first, then if the setsockaddr fails we'll see both the
address of the server and the exception detail (right now we just see the exception detail
which does not include the invlaid address in invalidaddressexception).

--
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

Mime
View raw message