Merge pull request #44 from influxdata/simplify-optional
refactor: simplify optionally finding the bucketpull/24376/head
commit
284652ff22
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue