Module: Moped::Failover::Reconfigure
Overview
Reconfigure is for exceptions that indicate that a replica set was potentially reconfigured in the middle of an operation.
Instance Method Summary collapse
-
#execute(exception, node) ⇒ Object
Executes the failover strategy.
Instance Method Details
#execute(exception, node) ⇒ Object
Executes the failover strategy. In the case of reconfigure, we check if the failure was due to a replica set reconfiguration mid operation and raise a new error if appropriate.
26 27 28 29 30 31 32 33 |
# File 'lib/moped/failover/reconfigure.rb', line 26 def execute(exception, node) if exception.reconfiguring_replica_set? raise(Errors::ReplicaSetReconfigured.new(exception.command, exception.details)) elsif exception.connection_failure? raise Errors::ConnectionFailure.new(exception.inspect) end raise(exception) end |