lib/mongo/cluster/sdam_flow.rb
def stale_primary?
      if updated_desc.election_id && updated_desc.set_version
        if topology.max_set_version && topology.max_election_id &&
            (updated_desc.set_version < topology.max_set_version ||
                (updated_desc.set_version == topology.max_set_version &&
                    updated_desc.election_id < topology.max_election_id))
          return true
        end
      end
      false
    end
# Whether updated_desc is for a stale primary.
Whether updated_desc is for a stale primary.
Whether updated_desc is for a stale primary .
def stale_primary?
      if updated_desc.election_id && updated_desc.set_version
        if topology.max_set_version && topology.max_election_id &&
            (updated_desc.set_version < topology.max_set_version ||
                (updated_desc.set_version == topology.max_set_version &&
                    updated_desc.election_id < topology.max_election_id))
          return true
        end
      end
      false
    end
def stale_primary? if updated_desc . election_id && updated_desc . set_version if topology . max_set_version && topology . max_election_id && ( updated_desc . set_version < topology . max_set_version || ( updated_desc . set_version == topology . max_set_version && updated_desc . election_id < topology . max_election_id ) ) return true end end false end
Whether updated_desc is for a stale primary.
Whether updated_desc is for a stale primary .