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

Include collection type with `create` events.

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Change streams
    • Labels:
      None
    • Query Execution
    • v7.0, v6.0, v5.0

      Currently `create` events offer no explicit indication of the type of the namespace that’s been created. Clients have to parse it heuristically:

      1. If there’s a collection UUID: type=collection.
      2. Otherwise, if viewOn is a system.buckets collection: type=timeseries.
      3. Otherwise, type=view.

      This means clients have to know about all collection types. So were there to be some new collection type, the logic above would process it as a view. Moreover, a client that doesn’t want to care about time-series collections nonetheless has to filter them out explicitly.

      It would seem better all around to add a “type” field to the event.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: