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

Do not mix collations during change stream rewrites

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • QE 2021-09-06

      $match stages appended to a change stream pipeline can use a custom collation for comparisons, but the oplog scan always uses the simple collation (see SERVER-31443). When performing rewrites, we must check whether the pipeline collation is non-simple; if so, we must abandon the attempt to rewrite the filters, since these may be more restrictive than the originals. For instance, {$match: {"documentKey.field": "blah"}} with a case-insensitive collation should match both "blah" and "BLAH", but rewriting this into the oplog will only return exact matches on "blah".

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: