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

    • Fully Compatible
    • ALL
    • TIG 2017-12-04

      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.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: