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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.7
    • Affects Version/s: None
    • Component/s: Querying, Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2019-01-28
    • 20

      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.

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

              Created:
              Updated:
              Resolved: