public function setSlaveOkay($ok = true)
    {
        if (version_compare(phpversion('mongo'), '1.3.0', '<')) {
            return $this->riak->setSlaveOkay($ok);
        }

        $prevSlaveOkay = $this->getSlaveOkay();

        if ($ok) {
            // Preserve existing tags for non-primary read preferences
            $readPref = $this->getReadPreference();
            $tags = ! empty($readPref['tagsets']) ? $readPref['tagsets'] : array();
            $this->riak->setReadPreference(\RiakClient::RP_SECONDARY_PREFERRED, $tags);
        } else {
            $this->riak->setReadPreference(\RiakClient::RP_PRIMARY);
        }

        return $prevSlaveOkay;
    }