You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2011/01/29 00:16:44 UTC
[jira] Commented: (CASSANDRA-1369) FBUtilities.hash can result in
thread contention on call to MessageDigest.getInstance()
[ https://issues.apache.org/jira/browse/CASSANDRA-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988307#action_12988307 ]
Hudson commented on CASSANDRA-1369:
-----------------------------------
Integrated in Cassandra #699 (See [https://hudson.apache.org/hudson/job/Cassandra/699/])
Avoid thread contention in FBUtilities.hash
Patch by brandonwilliams and jbellis, reviewed by brandonwilliams for CASSANDRA-1369
> FBUtilities.hash can result in thread contention on call to MessageDigest.getInstance()
> ---------------------------------------------------------------------------------------
>
> Key: CASSANDRA-1369
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1369
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Jason Fager
> Assignee: Brandon Williams
> Priority: Minor
> Fix For: 0.7.0
>
> Attachments: 1369-v2.txt, 1369.txt
>
>
> FBUtilities.hash() calls MessageDigest.getInstance() on every invocation, which in turns calls the synchronized method Provider.getService(). FBUtilities.md5hash() is frequently invoked from RandomPartitioner, and minor thread contention in this codepath can be observed when running contrib/py_stress against an out-of-box Cassandra installation.
> One possible solution is to preallocate md5 MessageDigest instances and store them as threadlocals.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.