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

Operation::Executable#execute raises exception for mongos

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

      With mongos / sharded cluster, Operation::Executable#execute incorrectly raises an exception. The following patch addresses this.

        module Operation
          # added context.mongos?
          module Executable
            def execute(context)
              unless context.primary? || context.standalone? || context.mongos? || secondary_ok?
                raise Exception, "Must use primary server"
              end
              context.with_connection do |connection|
                connection.dispatch([ message ])
              end
            end
          end
        end
      

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            gjmurakami Gary Murakami
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: