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

Only calculate 1.0 + dynamicBadnessThreshold once per loop in DynamicEndpointSnitch

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The change to make dynamicBadnessThreshold volatile and mutable in https://issues.apache.org/jira/browse/CASSANDRA-12179 could have minor implications for the performance of this code: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java#L216. Its better to calculate this once before the loop starts, which has the added benefit that the value is stable throughout the calculation as well.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jwest Jordan West Assign to me
            jwest Jordan West
            Jordan West
            David Capwell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment