cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate McCall (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-14163) RateBasedBackPressure unnecessarily invokes a lock on the Guava RateLimiter
Date Thu, 11 Jan 2018 21:35:01 GMT
Nate McCall created CASSANDRA-14163:
---------------------------------------

             Summary: RateBasedBackPressure unnecessarily invokes a lock on the Guava RateLimiter

                 Key: CASSANDRA-14163
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14163
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: Nate McCall
            Priority: Minor


{{o.a.c.net.RateBasedBackPressure#apply}} calls {{getRate()}} on the underlying Guava RateLimiter
several times in quick succession (including as the argument to a non level checked log statement).


The {{getRate()}} method acquires a lock within RateLimiter, so just getting a local variable
reference will remove several calls and thus several lock acquisitions. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message