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

Require db argument for getLastErrorDetailed in dbclient

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      Using the admin db by default will not work if using auth (and not auth'd to the admin db explicitly).

      There are 5 places, in bench.cpp, pipeline_d.cpp, and document_source_out.cpp where getLastErrorDetailed() is called without a db parameter. Each location has a db that makes more sense to use that admin and will already be authenticated against. getLastError() requires being authenticated to the database. These locations should be fixed to provide a db, and we should remove the form of getLastErrorDetailed() that provides a default so that future development does not accidentally make the same mistake.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-sharding Backlog - Sharding Team
            Reporter:
            scotthernandez Scott Hernandez
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: