Merge pull request #44 from influxdata/simplify-optional

refactor: simplify optionally finding the bucket
pull/24376/head
Jake Goulding 2020-02-21 11:49:42 -05:00 committed by GitHub
commit 284652ff22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -223,10 +223,7 @@ impl RocksDB {
) -> Result<Option<Arc<Bucket>>, StorageError> {
let buckets = self.bucket_map.read().unwrap();
let key = bucket_key(org_id, name);
match buckets.get(&key) {
Some(b) => Ok(Some(b.clone())),
None => Ok(None),
}
Ok(buckets.get(&key).map(Arc::clone))
}
// TODO: ensure that points with timestamps older than the first index level get matched against the appropriate index