Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-545

KillCursors gets sent to wrong member

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.3
    • Affects Version/s: 1.8.2
    • Component/s: None
    • None

      It looks like we are sending OP_KILL_CURSORS to the wrong members under certain scenarios.

      Reproducible with this code:

      #!/usr/bin/env ruby
      require 'mongo'
      
      include Mongo
      
      @secondary= MongoClient.new('localhost', 6000, {:slave_ok => true})
      @client= MongoReplicaSetClient.new([
        'localhost:3000',
        'localhost:6000'
      ])
      @coll= @client['test']['cursor']
      
      @coll.drop
      3.times { @coll.insert({:a => 1}) }
      
      puts "BEFORE: #{@secondary.db.command({:cursorInfo => 1})}"
      
      100.times do
        @coll.find({}, {:limit => 2, :read => :secondary}).to_a
      end
      
      puts "AFTER: #{@secondary.db.command({:cursorInfo => 1})}"
      

        1. ruby-545.git.diff
          3 kB
          Gary Murakami
        2. ruby-545.git.diff
          3 kB
          Gary Murakami

            Assignee:
            tyler@10gen.com Tyler Brock
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: