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

Remove compatibility for 4.2 $sortKey format

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • Query 2020-03-23, Query 2020-04-06

      After branching for 4.4, the new branch will no longer need to support the wire format for change streams $sortKeys used in 4.2. We will be able to remove any FCV checks and other compatibility checks used to support the old format.

      Update: As part of SERVER-43669, we added more changes to how sort keys are communicated back to the merging node, and those changes come with more upgrade/downgrade compatibility code that will be obsolete after branching for 4.5.

      • There is now a 'SortKeyFormat' enum that should be deleted as part of this ticket. Also delete the 'sortKeyFormat' member of the ExpressionContext.
      • There are switch statements in document_value/document.cpp, return_key.cpp, and pipeline/expression.cpp that choose which serialization function to use based on the 'sortKeyFormat' value. These switch statements can be replaced with a call to serializeSortKeyAsArray().
      • The serializeSortKeyAsObject() function will be obsolete and can be deleted.
      • The 'sortKeyFormat' argument to Document::toBSONWithMetadata() can also be deleted.
      • The "use44SortKeys" property of AggregationRequest and QueryRequest can be deleted, along with associated accessors and string constants.
      • The if statements in find_cmd.cpp and run_aggregate.cpp that initialize the 'sortKeyFormat' property of ExpressionContext can be deleted. These if statements are each marked with a TODO that references this ticket.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: