Operation::Executable#execute raises exception for mongos

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0.0
    • Affects Version/s: 2.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Gary Murakami (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: