You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org> on 2011/10/19 23:13:10 UTC

[jira] [Commented] (CASSANDRA-3387) unnecessary locking in hint path due to InetAddress.getLocalhost()

    [ https://issues.apache.org/jira/browse/CASSANDRA-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130999#comment-13130999 ] 

Jonathan Ellis commented on CASSANDRA-3387:
-------------------------------------------

Why not just use FBUtilities.getLocalAddress?
                
> unnecessary locking in hint path due to InetAddress.getLocalhost()
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-3387
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3387
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Yang Yang
>            Priority: Minor
>         Attachments: 3387.diff
>
>
> in tests we found locking contention also due to the following
> Stacks at 01:49:19 PM (uptime 10:54)
> MutationStage:62 [BLOCKED] CPU time: 0:06
> java.net.InetAddress.getLocalHost()
> org.apache.cassandra.utils.UUIDGen.getClockSeqAndNode()
> org.apache.cassandra.utils.UUIDGen.createTimeUUIDBytes(long)
> org.apache.cassandra.utils.UUIDGen.getTimeUUIDBytes()
> org.apache.cassandra.db.RowMutation.hintFor(RowMutation, ByteBuffer)
> org.apache.cassandra.service.StorageProxy$4.run()
> java.lang.Thread.run()
> we can easily change every getLocalHost() call to use a cached value

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