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

validate_collections_on_shutdown does not run validate on all databases, only the last one

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.5.9
    • Fix Version/s: 3.6.0-rc4
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      TIG 2017-12-04

      Description

      for (let dbName of dbNames) {
          cmds.then("DEBUG: validating " + dbName, function(conn) {
              if (!validateCollections(conn.getDB(dbName), {full: true})) {
                  return {shouldStop: true, reason: "collection validation failed"};
              }
          });
      }
      

      The function above ends up using the last dbName for each run of the loop, rather than rebinding dbName for each value.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: