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

Ensure stability of resumeTokens across versions

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 8.1.0-rc0
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • QE 2024-11-25

      SERVER-88142 introduced an additional subfield type inside the operationDescription of "create" changestream events, in case "showExpandedEvents" is used.

      This is fine as a new feature, but it turned out that the full operationDescription is used when generating resumeTokens.

      That means resumeTokens for a "create" event can differ depending on the server version, depending on whether or not the version generates the operationDescription.type subfield.

      One possible solution is to not take the new operationDescription.type subfield into account when generating resumeToken values, but it adds new complexity and opens up the possibility of forgetting to exclude the fields in different places of the code.

      A better solution would be to expose the value that's currently in operationDescription.type in a new top-level field, which will never be used for calculating resumeTokens.

      We should thus revert the changes from SERVER-88142 (which is fine because they have not been released yet), so that the operationDescription values for "create" changestream events will remain the same when upgrading from older versions to 8.1. The resumeTokens will then remain fully compatible.
      The "type" value should be exposed in a new top-level field named extra if the changestream was opened with the "showExpandedEvents" flag. The purpose of the extra field is to convey additional information for an event without affecting the resumeToken values.
      The extra field is new and currently only exposed for "create" events in case the expanded events are produced. It may be used in the future to return additional data for other events.

            Assignee:
            jan.steemann@mongodb.com Jan Steemann
            Reporter:
            jan.steemann@mongodb.com Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: