Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-203

get different throughput when using db.slaveOk() versus db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.3
    • Affects Version/s: 2.2
    • Component/s: Performance
    • None
    • Environment:
      EC2 / Ubuntu 10.04
      1.6.3
      2.2 Java Driver

      Problem:
      Get the following results

      Case 1: db.slaveOk()
      Queries : 120

      Case 2: db.collection.addOption(Bytes.QUERYOPTION_SLAVEOK)
      Queries : 412095

      Workaround:
      Don't use db.slaveOk()

      Reproduce:
      See attached SlaveTest.java

      • compile with Java 2.2 Driver
      • Case 1 : java -cp mongo-2.2.jar:. com.test.SlaveTest "10.202.215.63:27000,10.243.7.47
        :27000" test blogs 1 3
      • Case 2 : java -cp mongo-2.2.jar:. com.test.SlaveTest "10.202.215.63:27000,10.243.7.47
        :27000" test blogs 2 3

      Business Case:

      • performance

        1. SlaveTest.java
          3 kB
          Alvin Richards
        2. SlaveTest.java
          3 kB
          Alvin Richards

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: