You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Thomas Koch (Created) (JIRA)" <ji...@apache.org> on 2011/11/04 19:33:51 UTC

[jira] [Created] (ZOOKEEPER-1288) Always log sessionId and zxid as hexadecimals

Always log sessionId and zxid as hexadecimals
---------------------------------------------

                 Key: ZOOKEEPER-1288
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1288
             Project: ZooKeeper
          Issue Type: Sub-task
            Reporter: Thomas Koch
            Assignee: Thomas Koch


At some points, sessionIds or zxid are written in decimal numbers to the log but most of the time as hexadecimals. It's an unnecessary hassle to manually convert these numbers to find additional log lines referring the same numbers. Or worse people may not know that there may be additional information available if they also search for the decimal representation of a number.

--
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] [Commented] (ZOOKEEPER-1288) Always log sessionId and zxid as hexadecimals

Posted by "Thomas Koch (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144621#comment-13144621 ] 

Thomas Koch commented on ZOOKEEPER-1288:
----------------------------------------

I didn't want to suggest changing the serialized format, just the in memory format. The StatPersisted object can be generated for serialization from the data stored in the DataNode.
                
> Always log sessionId and zxid as hexadecimals
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1288
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1288
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>
> At some points, sessionIds or zxid are written in decimal numbers to the log but most of the time as hexadecimals. It's an unnecessary hassle to manually convert these numbers to find additional log lines referring the same numbers. Or worse people may not know that there may be additional information available if they also search for the decimal representation of a number.

--
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] [Commented] (ZOOKEEPER-1288) Always log sessionId and zxid as hexadecimals

Posted by "Patrick Hunt (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144284#comment-13144284 ] 

Patrick Hunt commented on ZOOKEEPER-1288:
-----------------------------------------

it's a bug if they are not logged as hex. I've done passes before looking for these and changing over when we print decimal, but it's error prone (both finding and keeping new dec refs from creeping in).
                
> Always log sessionId and zxid as hexadecimals
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1288
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1288
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>
> At some points, sessionIds or zxid are written in decimal numbers to the log but most of the time as hexadecimals. It's an unnecessary hassle to manually convert these numbers to find additional log lines referring the same numbers. Or worse people may not know that there may be additional information available if they also search for the decimal representation of a number.

--
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] [Commented] (ZOOKEEPER-1288) Always log sessionId and zxid as hexadecimals

Posted by "Patrick Hunt (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144462#comment-13144462 ] 

Patrick Hunt commented on ZOOKEEPER-1288:
-----------------------------------------

Changing the on-disk format in a non-bw compatible way is a non-starter outside of a major version change. Users don't like to run migrations, also they are messy & error prone.
                
> Always log sessionId and zxid as hexadecimals
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1288
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1288
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>
> At some points, sessionIds or zxid are written in decimal numbers to the log but most of the time as hexadecimals. It's an unnecessary hassle to manually convert these numbers to find additional log lines referring the same numbers. Or worse people may not know that there may be additional information available if they also search for the decimal representation of a number.

--
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] [Commented] (ZOOKEEPER-1288) Always log sessionId and zxid as hexadecimals

Posted by "Thomas Koch (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144377#comment-13144377 ] 

Thomas Koch commented on ZOOKEEPER-1288:
----------------------------------------

A related idea to this: In my refactoring branch I've replaced long zxid with a Zxid class that also holds the time correlated to a zxid. Using such an object an giving it a toString method could solve the problem.

Current memory usage of zxid and time in a DataNode:
4 bytes reference to StatPersisted
8 bytes StatPersisted object header
16 bytes for two timestamps
32 bytes for three zxid longs
====
68 bytes

Moving everything from StatPersisted directly in the DataNode and reuse same Zxids across DataNodes:

3*4 bytes for references to each Zxid
8 bytes object overhead for a Zxid
2*8 bytes for actual zxid and timestamp values in the Zxid object
====
36 bytes

Savings: Around 32 bytes for each DataNode in the system assuming that there are only as many zxid objects as there are datanodes.
                
> Always log sessionId and zxid as hexadecimals
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1288
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1288
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Thomas Koch
>            Assignee: Thomas Koch
>
> At some points, sessionIds or zxid are written in decimal numbers to the log but most of the time as hexadecimals. It's an unnecessary hassle to manually convert these numbers to find additional log lines referring the same numbers. Or worse people may not know that there may be additional information available if they also search for the decimal representation of a number.

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