[v8.0] Enable backward compatibility for 'compactAnchorPaddingFactor' and 'maxAnchorCompactionSize' fields of fleCompactionOptions cluster parameter

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.0.0
    • Component/s: None
    • None
    • Server Security
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In v8.0, two new fields were added to the fleCompactionOptions cluster parameter: maxAnchorCompactionSize  and compactAnchorPaddingFactor .

      • maxAnchorCompactionSize did not receive any explicit upgrade/downgrade handling.
      • compactAnchorPaddingFactor did but the downgrade behavior is incorrect:
        • When compactAnchorPaddingFactor was introduced, downgrade logic was added in the FCV machinery.
        • That logic first reads the entire fleCompactionOptions parameter, including fields with default values.
        • If an entry for fleCompactionOptions exists in config.clusterParameters, it then updates the document by writing all fields except compactAnchorPaddingFactor.

      The downgrade handling of compactAnchorPaddingFactor has an unintended side effect during downgrade from v8.0 -> v7.0:

      • The downgrade writes maxAnchorCompactionSize into config.clusterParameters even if the user has never explicitly set it.
      • When the binary is then replaced with v7.0, the server crashes because v7.0 does not recognize the maxAnchorCompactionSize field.

       
      Proposed fix
       
      To correctly handle downgrades from v8.0 to v7.0, we propose:

      • Prevent the user from setting maxAnchorCompactionSize  or compactAnchorPaddingFactor fields when FeatureFlagQERangeV2 is disabled by adding a new handling case in allowedToEnable(). This ensures these fields are not persisted to config.clusterParameters while FCV is 7.0.
      • Update the downgrade process so that it removes the maxAnchorCompactionSize and compactAnchorPaddingFactor fields from config.clusterParameters, but only if they are present.

            Assignee:
            Unassigned
            Reporter:
            Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: