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

Collections can become views during shard version recovery

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2020-08-10
    • Linked BF Score:
      7

      Description

      onShardVersionMismatch possibly triggers a recovery of the collection's shard version.

      Calling onShardVersionMismatch with a namespace corresponding to a view doesn't make sense because the view is not versioned. For this reason we correctly throw an error if this happens. On the other hand during the recovery of the collection's shard version, it is possible that a view is created for the same namespace, thus it is not correct to throw an CommandNotSupportedOnView error on the exit snippet of the recoverRefreshShardVersion() function.

      I guess the fix would be as simple as changing kViewsForbidden to kViewsPermitted here.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marcos.grillo Marcos José Grillo Ramirez
              Reporter:
              tommaso.tocci Tommaso Tocci
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: