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

Suspect OnDiskIndex.IteratorOrder.startAt code for ASC

    XMLWordPrintableJSON

Details

    • Low

    Description

      startAt for ASC does

                      case ASC:
                          if (found.cmp < 0) // search term was bigger then whole data set
                              return found.index;
                          return inclusive && (found.cmp == 0 || found.cmp < 0) ? found.index : found.index - 1;
      

      which is equivalent to

                      case ASC:
                          if (found.cmp < 0) // search term was bigger then whole data set
                              return found.index;
                          return inclusive ? found.index : found.index - 1;
      

      which seems wrong. Is the parenthesis wrong here?

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbrosius David Brosius
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: