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

XMLWordPrintableJSON

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

      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
              Reporter:
              Eric Milkie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: