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

sorth.js makes invalid assumption about order of results

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.13, 3.2.9, 3.3.10
    • Component/s: Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Query 16 (06/24/16), Query 17 (07/15/16)
    • Linked BF Score:
      0

      Description

      The assertion below is invalid and should be removed or restructured.

      Original Description

      sorth.js makes some sorted queries on an index and expects the documents to come in a certain order. It's not clear that the order of documents is guaranteed in some cases. On WiredTiger, the test can fail because a different document is returned first from the index.

      In the following case, we did a query on a descending index with a descending sort. We expected to get { a:1, b:3 }, but instead we get { a:2, b:3 }. The index keys for the index used for the query do not include "a".

      assert: [1] != [2] are not equal : undefined
      Error: [1] != [2] are not equal : undefined
          at Error (<anonymous>)
          at doassert (src/mongo/shell/assert.js:11:14)
          at Function.assert.eq (src/mongo/shell/assert.js:38:5)
          at assertMatch (jstests/core/sorth.js:10:16)
          at assertMatches (jstests/core/sorth.js:20:9)
          at checkMatches (jstests/core/sorth.js:35:5)
          at checkReverseDirection (jstests/core/sorth.js:124:5)
          at jstests/core/sorth.js:140:1
          at <anonymous>:7:56
          at Function.Date.timeFunc (src/mongo/shell/types.js:27:17)
      2015-01-16T19:03:23.114+0000 E QUERY    Error: [1] != [2] are not equal : undefined
          at Error (<anonymous>)
          at doassert (src/mongo/shell/assert.js:11:14)
          at Function.assert.eq (src/mongo/shell/assert.js:38:5)
          at assertMatch (jstests/core/sorth.js:10:16)
          at assertMatches (jstests/core/sorth.js:20:9)
          at checkMatches (jstests/core/sorth.js:35:5)
          at checkReverseDirection (jstests/core/sorth.js:124:5)
          at jstests/core/sorth.js:140:1
          at <anonymous>:7:56
          at Function.Date.timeFunc (src/mongo/shell/types.js:27:17) at src/mongo/shell/assert.js:13
      ********** Parallel Test FAILED: Error: error loading js file: jstests/core/sorth.js
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: