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

mongos should set the CursorNotFound bit when the cursor is not found

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.7, 2.5.1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • ALL

      MongoDB Status as of October 9th, 2013

      ISSUE SUMMARY
      mongos does not set the CursorNotFound bit in the response when the cursor is not found for unsharded collections. Instead it sets the QueryFailure bit. See the response definition here.

      USER IMPACT
      The wrong message will be returned to the user through their client driver. It is present in versions of MongoDB prior to and including v2.4.6.

      SOLUTION
      The issue has been solved by bringing the behavior of mongos into accordance with mongod and mongos with sharded collections.

      WORKAROUNDS
      None

      PATCHES
      Production release v2.4.7 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.

      Original Description

      Instead, it sets the QueryFailure bit.

      See http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply.

      Drivers typically have different exception types for these two bits, so end up throwing a different exception when running against a shard cluster.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: