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

Require db argument for getLastErrorDetailed in dbclient

    • Sharding

      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.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: