private function withPrimaryReadPreference(\Closure $closure)
    {
        $prevReadPref = $this->mongoCollection->getReadPreference();
        $this->mongoCollection->setReadPreference(\MongoClient::RP_PRIMARY);

        try {
            return $closure();
        } finally {
            $prevTags = ! empty($prevReadPref['tagsets']) ? $prevReadPref['tagsets'] : [];
            $this->mongoCollection->setReadPreference($prevReadPref['type'], $prevTags);
        }
    }