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

Wasted work in StorageService.initClient()

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

Details

    • Task
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.6
    • None
    • any

    Description

      The problem appears in version 1.2.5 and in revision 26018be2.. I
      attached a one-line patch that fixes it.

      In method "StorageService.initClient", the loop over
      "Gossiper.instance.getLiveMembers()" should break immediately after
      "isUp" is set to "true". All the iterations after "isUp" is set to
      "true" do not perform any useful work, at best they just set "isUp"
      again to "true".

      Method "getCompactedRow" in class "ParallelCompactionIterable.Reducer"
      has a similar loop (over "rows"), and this loop breaks immediately
      after "inMemory" is set to "false", just like in the proposed patch.
      Other methods (e.g., "GroupByPrefix.count",
      "SecondaryIndex.buildIndexAsync") also have similar loops with similar
      breaks, just like in the proposed patch.

      Attachments

        Activity

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

          People

            adriannistor Adrian Nistor Assign to me
            adriannistor Adrian Nistor
            Adrian Nistor
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment