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

Ensure change stream update lookup uses the correct collation

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Epic Link:
    • Sprint:
      Repl 2017-10-23, Repl 2017-11-13, Repl 2017-12-04

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              charlie.swanson Charlie Swanson
              Reporter:
              charlie.swanson Charlie Swanson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: