| 69 | } |
| 70 | |
| 71 | bool brpc::CouchbaseManifestManager::getBucketToCollectionManifest( |
| 72 | std::string server, std::string bucket, |
| 73 | CouchbaseManifestManager::CollectionManifest* manifest) { |
| 74 | SharedLock read_lock(rw_bucket_to_collection_manifest_mutex_); |
| 75 | auto it1 = bucket_to_collection_manifest_.find(server); |
| 76 | if (it1 == bucket_to_collection_manifest_.end()) { |
| 77 | return false; |
| 78 | } |
| 79 | auto it2 = it1->second.find(bucket); |
| 80 | if (it2 == it1->second.end()) { |
| 81 | return false; |
| 82 | } |
| 83 | *manifest = it2->second; |
| 84 | return true; |
| 85 | } |
| 86 | |
| 87 | bool brpc::CouchbaseManifestManager::getManifestToCollectionId( |
| 88 | CouchbaseManifestManager::CollectionManifest* manifest, std::string scope, |
no test coverage detected