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

benchRun() findOne option "check" does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Performance, Shell
    • Labels:
    • Operating System:
      ALL

      Description

      The "check" option to the findOne operation allows the caller to specify a Javascript predicate function which is called with the object returned by the query; each time the operation is run, benchRun() asserts that the predicate function returns true.

      However, this option does not work; whenever it is used, an error is always thrown with message "no createDirectClient in clientOnly". See the following shell session:

      > benchRun({ops:[{op: "findOne", query: {}, ns: "test.foo", check: function(obj) { return true; }}], seconds: 5})
      connecting to: test
      2015-10-19T14:54:11.176-0400 E -        DBException not handled in benchRun thread :: caused by :: 10256 no createDirectClient in clientOnly
      {
      	"note" : "values per second",
      	"errCount" : NumberLong(0),
      	"trapped" : "error: not implemented",
      	"findOneLatencyAverageMicros" : 255.1,
      	"totalOps" : NumberLong(10),
      	"totalOps/s" : 1.9999312023666385,
      	"findOne" : 1.9999312023666385,
      	"insert" : 0,
      	"delete" : 0,
      	"update" : 0,
      	"query" : 0,
      	"command" : 0
      }
      

        Attachments

          Activity

            People

            Assignee:
            backlog-server-perf Backlog - Performance Team
            Reporter:
            rassi J Rassi
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: