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

Incorrect result when using regexp in $in

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • ALL

      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?

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

              Created:
              Updated:
              Resolved: