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

Reconsider flow of collection creation and refresh in the CollectionRoutingInfoTargeter

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • CAR Team 2023-11-27
    • 153

      A description of the problem is in the attached BF.

      One solution would be to avoid the compiler optimizations by reordering the arguments to the or statements so that the refreshIfNeeded must be executed.

      However, it may be a less fragile solution to include the refresh in the createCollectionIfNeeded function so that _lastError is always reset to boost::none, even if a new caller of these functions forgets to call both.

      We should consider, especially in the bulk_write_exec where there are many targeters, whether we want all of the statements to execute or whether we want to exit early as part of this ticket.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: