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

Dynamic Snitch isWorthMergingForRangeQuery Doesn't Handle Some Cases Optimally

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.0.10, 2.1 rc5
    • None
    • Low

    Description

      I was investigating slow responses for queries like select * from system.peers and noticed that the dynamic endpoint snitch was reporting that the query was not worth merging. In this case, the local host had a score of 0, so return maxMerged < maxL1 + maxL2 was returning false. I believe using a <= condition is the proper fix there.

      Additionally, because scores are looked up three separate times, this method is a prone to race conditions. I don't think it's worth fixing the race condition for a multi-node scenario, but at least in the single-node case, we can immediately return true and avoid any race conditions that would cause it to erroneously return false.

      Attachments

        Activity

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

          People

            ala.alkhaldi Ala' Alkhaldi Assign to me
            thobbs Tom Hobbs
            Ala' Alkhaldi
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment