audit the use of SortedDataInterface::Cursor::seek for full index traversal in our tests

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 4.3.1
    • Affects Version/s: 3.3.5
    • Component/s: Storage
    • Fully Compatible
    • ALL
    • Execution Team 2019-09-09
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There are a number of places where we traverse an index by seeking to kMinBSONKey:

      for (auto entry = cursor->seek(kMinBSONKey, true); entry; i++, entry = cursor->next()) 
      

      This is correct only for non-compound indexes and may confuse future readers who may want to use it for traversing a generic index. Whenever possible, we should seek to BSONObj() instead of kMinBSONKey; this will seek to the leftmost document in the index, regardless of the index type.

            Assignee:
            Haley Connelly
            Reporter:
            Robert Guo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: