class Moped::Errors::PotentialReconfiguration
Classes of errors that could be caused by a replica set reconfiguration.
Constants
- CONNECTION_ERRORS_RECONFIGURATION
-
Error codes received around reconfiguration
- NOT_MASTER
-
Not master error codes.
Public Instance Methods
Source
# File lib/moped/errors.rb, line 116 def connection_failure? CONNECTION_ERRORS_RECONFIGURATION.include?(details["code"]) end
Source
# File lib/moped/errors.rb, line 111 def reconfiguring_replica_set? err = details["err"] || details["errmsg"] || details["$err"] || "" NOT_MASTER.include?(details["code"]) || err.include?("not master") end
Replica set reconfigurations can be either in the form of an operation error with code 13435, or with an error message stating the server is not a master. (This encapsulates codes 10054, 10056, 10058)