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

Ensure change stream update lookup uses the correct collation

    • Fully Compatible
    • ALL
    • v3.6
    • Repl 2017-10-23, Repl 2017-11-13, Repl 2017-12-04

      When doing the updateLookup as part of a change stream, it is important both to use the simple collation to target the lookup when the collection is sharded and to use the collection-default collation on the shard when the collection is not sharded and the update lookup is executing on the mongod itself.

      In order to target only one shard, we need to have the simple collation and an exact match on the shard key. When we get to the shard, it is always correct to use the simple collation, but it may not be able to use the _id index if the collection has a non-simple default collation.

      If possible, the ideal world on mongos would be to target using the simple collation, then send the aggregate responsible to the lookup without specifying a collation, allowing it to inherit the collection's default collation. The desired behavior on mongod is to always use the collection's default collation for the lookup.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: