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

v2.6 mongos doesn't verify _id is present for config server upserts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.1
    • Fix Version/s: 2.6.4, 2.7.2
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL
    • Backport Completed:

      Description

      Issue Status as of Jul 22, 2014

      ISSUE SUMMARY
      In a sharded cluster, mongos does not verify that the _id field is present for upserts to multiple config servers. This can lead to inconsistent _id fields on different config servers if the id is not explicitly provided.

      USER IMPACT
      Manipulating config metadata manually via a mongos may lead to inconsistent config servers and unexpected behavior in the sharded system. Metadata changes via normal command operations (shardCollection, balance, split, move, and merge) are not affected.

      WORKAROUNDS
      Always ensure that any manual upserts of config metadata (including data in the "admin" database) contain an equality match on the _id value for the query portion of the upsert.

      AFFECTED VERSIONS
      All production releases since version 2.6.0 are affected by this issue.

      FIX VERSION
      The fix is included in the 2.6.4 production release.

      RESOLUTION DETAILS
      Checks were implemented to prevent upserts without valid _id in the query part of the upsert.

      Original description

      This can lead to mismatched _ids on documents - client code should not use this behavior (2.4 disallows) but it should also be illegal in v2.6.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: