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

Collections can become views during shard version recovery

    • Fully Compatible
    • ALL
    • Sharding 2020-08-10
    • 7

      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.

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

              Created:
              Updated:
              Resolved: