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

validate() helper in the mongo shell needs work

    XMLWordPrintableJSON

Details

    • ALL

    Description

      see str.match() lines below - bad with certain collection names

      > db.foo.validate
       function () {
       var res = this._db.runCommand(
       
      {validate:this.getName()}
       
      );
       res.valid = false;
       var raw = res.result || res.raw;
       if (raw) {
       var str = "-" + tojson(raw);
       res.valid = !(str.match(/exception/) || str.match(/corrupt/));
       var p = /lastExtentSize:(\d+)/;
       var r = p.exec(str);
       if (r)
       
      { res.lastExtentSize = Number(r[1]); }
       
      }
       return res;
       }>
       

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            dwight@mongodb.com Dwight Merriman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: