Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38964

geo_distinct.js does not properly sort an array of documents before checking for an expected ordering

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.7
    • None
    • Querying, Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2019-01-28
    • 20

    Description

      If the primary steps down after inserts have been made in geo_distinct.js, then the new primary is not guaranteed to have inserted them in the same order. This manifested when all of these inserts were part of the same transaction (and therefore the same applyOps oplog entry). The test then fails a check of the returned documents because they are in the wrong order and the sort function used does not actually sort the documents.

      Instead, we should properly sort the returned documents using bsonWoCompare.

      Attachments

        Activity

          People

            samy.lanka@mongodb.com Samyukta Lanka
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: