Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14163

RateBasedBackPressure unnecessarily invokes a lock on the Guava RateLimiter

    XMLWordPrintableJSON

Details

    Description

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

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

      Attachments

        1. 14163.patch
          3 kB
          Nate McCall

        Activity

          People

            zznate Nate McCall
            zznate Nate McCall
            Nate McCall
            Jason Brown
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: