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

Remove feature compatibility version casing around TTL indexes on capped collections

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: 6.0 Desired
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-07-25

      Before version 5.2, TTL indexes were allowed to be created on capped collections. However, due to SERVER-26287, this is fixed in versions 5.2 and on. There is casing in the server code and in the testing around the case where we are running a version where this is fixed, but the feature compatibility version is lower than 5.2, in which case we should allow TTL indexes to be created on capped collections (for multiversion cluster purposes). However, when 6.0 is LTS, there should be no further need for this, since 6.0 nodes will never have to talk to nodes with version less than 5.2. Specific pieces of code which can be removed:

      The check for FCV and comment here: https://github.com/10gen/mongo/blob/80137862fdf4e2f65e0d822abe8d70da63854d3d/src/mongo/db/catalog/index_catalog_impl.cpp#L331-L339

      This entire test:

      https://github.com/10gen/mongo/blob/80137862fdf4e2f65e0d822abe8d70da63854d3d/jstests/multiVersion/ttl_index_capped_collection.js

       

            Assignee:
            fausto.leyva@mongodb.com Fausto Leyva (Inactive)
            Reporter:
            gabriel.marks@mongodb.com Gabriel Marks
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: