Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5721

Query for sharded findAndModify must contain the shard key

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 1.31.1, 1.31.2
    • Component/s: Compass
    • None
    • Environment:
      Windows 10
    • Not Needed

      Problem Statement/Rationale

      I insert a document in a sharded collection using nodejs driver. I can update it using nodejs driver. I can't update it using compass gui.

      I get the error "Query for sharded findAndModify must contain the shard key". But the record does contain the shard key and everything is valid. I don't know which query compass is sending, but it seems erratic.

      Steps to Reproduce

      I don't know. Maybe a simple sharded collection, sharded with method HASHED.

      Expected Results

      It should update.

      Actual Results

      Update is denied with the error "Query for sharded findAndModify must contain the shard key".

      Additional Notes

      Please see the screenshots. The collection "appointment" is sharded on "_where._location._country._locId" with the method "HASHED". It should work.

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            bonjourjoel@gmail.com Joel J
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: