Stop setFCV at feasibility phase if there are index builds in progress

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.3.0-rc0, 8.2.0, 9.0.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem: Some of the catalog changes we do on setFCV can not be done if there's an index build is in progress; f there is, then setFCV fails with a BackgroundOperationInProgressForNamespace error and:

      • The user can not complete the upgrade/downgrade until the index build finishes (which may take hours/days) or is aborted.
      • The user can not return to the original FCV since the failure happens on the "isCleaningServerMetadata" part of setFCV.

      This can leave users stuck on setFCV for a long time, which is undesirable.

       

      *List of catalog changes on setFCV incompatible with index builds (non exhaustive):

      1. On upgrade, collMod to remove deprecated catalog fields (all collections)
      2. On downgrade, collMod to remove recordIdsReplicated: true (all new collections)
      3. Convert timeseries to/from viewless format on upgrade / downgrade (see SERVER-119738 for detail).

       

      Solution: Add a feasibility check on setFCV (userCollectionsUassertsForUpgrade / userCollectionsUassertsForDowngrade) that fails early if there are index builds on progress. If this happens the user is still on the original FCV.

       

      This would be best effort (the index build may start during the upgrade/downgrade) but it's expected to catch the majority cases where this would cause setFCV to fail.

            Assignee:
            Unassigned
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: