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

Investigate allowing the change stream oplog query to run using the pipeline collation

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization

      Change streams have always prevented a user-defined collation from being applied to the filter pushed down into the oplog, primarily so that a case-insensitive collation cannot cause a single-collection stream to return events from multiple similarly-named collections (see SERVER-31443).

      This became an issue during PM-1942, since we are now rewriting user filters into the oplog, and the user may have specified a collation for their $match filters. We therefore chose, in SERVER-59426 and SERVER-59840, to abandon any attempt to rewrite the user's query if they have requested a non-simple collation. This behavior ensures that a user collation does not get applied to the oplog query, which could have unintended consequences.

      However, in practice the changes inĀ SERVER-56872 should actually make the oplog query collation-agnostic. All predicates on namespace fields now use regexes, which ignore the collation. The remaining predicates all operate on fields that cannot have a string value or fields whose values belong to a limited set of strings that cannot be confused for each other by any collation (e.g., the "op" field).

      It may therefore now be safe to allow the oplog query to have an arbitrary collation.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: