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

Incorrect result when using regexp in $in

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Incomplete
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      Hi,

      I am operating a 6 shard MongoDB Cluster.
      The following two patterns of queries should have the same results, but sometimes they are incorrect.

      mongos> db.programs.find({ _id: /hoge/ }).count()
      0
      

      mongos> db.programs.find({_id: {$in: [/hoge/] }}).count()
      51
      

      However in explain("executionStats") results both nReturned is 51.
      Also, even I execute the same query on each shard node, each result is different.

      What kind of cause can be considered?

      Attachments

        Activity

          People

            nick.brewer Nick Brewer
            service@abema.tv Suguru Namura
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: