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

add version check in shardSvrResolveView

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible

      From github comment:

      Here we have no guarantee the view will be present. The routing information for a view could potentially be stale. When you route to the primary (as in this case) you always attach a dbVersion that represents the version of the information the router knows. However, before accessing any nss we need to verify those versions are up-to-date.

      You can access the view by using shard role api as done here and replace the lookupView you run here. This equivalent but it will have the extra benefit of

      1. Check the attached version
      2. Throw in case the version is stale
      3. Refresh the router and retry on the correct primary

            Assignee:
            josh.siegel@mongodb.com Josh Siegel
            Reporter:
            maddie.zechar@mongodb.com Maddie Zechar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: