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

Two documents can share the same documentKey when using a non-simple collation.

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying, Sharding, Write Ops
    • None
    • ALL
    • Hide

      Download the attached 'repro.js', and run

      python buildscripts/resmoke.py repro.js
      
      Show
      Download the attached 'repro.js', and run python buildscripts/resmoke.py repro.js
    • Query 2017-12-04

      When a collection with a non-default collation is sharded the chunks are arranged, migrated and targeted using the simple collation. This can mean that two documents that have identical shard keys according to the collation can live on different shards. For example, when using a case-insensitive collation, the chunk containing the shard key "abc" can live on a different shard than the chunk containing the shard key "ABC" - even though these two documents might be considered equal when using the case-insensitive collation. This means that the combination of shardKey and _id is not unique, since there is nothing to enforce that a document with shard key "ABC" has a different _id than the document with shard key "abc".

      See the attached repro.js for an example of the impact of this - a non-multi write will update two documents.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: