Investigate changes in SERVER-111008: Remove change stream change collection code

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Original Downstream Change Summary

      This change removes the code related to change streams "change collections".

      The change streams "change collections" feature was based on the "serverless" feature, which was never officially released and thus should not have been used except during core server development and testing.

      In addition to removing the unused code, this PR also removes the following public server parameters and commands:

      • server parameter FeatureFlagServerlessChangeStreams: this feature flag was always "false" by default. It is now fully removed from the code, so using this flag when starting the server will now produce a BadValue startup error.
      • server parameter changeStreams, with its only sub-parameter expireAfterSeconds: this parameter could previously be used to set an expiration time for change stream change collections. As the parameter is now removed, using the parameter on startup will now produce a BadValue error.
      • server parameter changeCollectionExpiredDocumentsRemoverJobSleepSeconds: this parameter was used to control the expiration time for change collection data. As the parameter is now removed, using the parameter on startup will now produce a BadValue error.
      • server parameter disableExpiredChangeCollectionRemover: this parameter was used to disable the removal of expired data from change collections. As the parameter is now removed, using the parameter on startup will now produce a BadValue error.
      • command setChangeStreamState: this command could be used to modify the parameters of change stream change collections at runtime. This command previously returned an assertion failure if change collections were disabled. As the command is now fully removed, trying to execute it will now produce a CommandNotFound error.
      • command getChangeStreamState: this command could be used to retrieve the parameters of change stream change collections at runtime. This command previously returned an assertion failure if change collections were disabled. As the command is now fully removed, trying to execute it will now produce a CommandNotFound error.

      The change also removes the optional section changeCollections from the serverStatus metrics that provides aggregated statistics for change collections. This section was previously only rendered if the feature flag for change collections was enabled, which should have not been the case in any production system. When the feature flag was disabled, the serverStatus section was not rendered.

      Description of Linked Ticket

      Serverless is now deprecated (see doc), but we still have code related to it in the server that we should cleanup. Change stream change collection was a feature done for serverless and is now deprecated.

      We should get rid of change_stream_serverless_helpers::isServerlessEnvironment() and its usage. And in general we should remove the src/mongo/db/change_stream_serverless_helpers.h/cpp files.

      This PR adds some TODOs for this.

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: