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

Replace cursor->next() with cursor->nextSafe() in the ShardingCatalogManager

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2025-03-03
    • 1

      Replace this cursor->next() with a cursor->nextSafe() call.
      According to this comment, a nextSafe() should be used if you may get remote errors.

      At first sight, this may not seem necessary in this case since the query is executed against the DbDirectClient (which means it performs a local query).
      However it feels safer to call nextSafe() in any case, just to make sure we handle all the errors properly.

            Assignee:
            meryama.nadim@mongodb.com Meryama Nadim
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: