Skip to content

Commit

Permalink
fix: Cache name is not unique when there are multiple endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
chubei committed Oct 31, 2023
1 parent adff53a commit 7e7fc35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dozer-api/src/cache_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ fn create_cache(
write_options: CacheWriteOptions,
) -> Result<Box<dyn RwCache>, CacheError> {
let (alias, cache_labels) = endpoint_meta.cache_alias_and_labels(labels);
let cache_name = format!("{}_{}", endpoint_meta.log_id, alias);
let cache = cache_manager.create_cache(
endpoint_meta.log_id.clone(),
cache_name.clone(),
cache_labels,
(
endpoint_meta.schema.schema,
Expand All @@ -242,7 +243,7 @@ fn create_cache(
&endpoint_meta.schema.connections,
write_options,
)?;
cache_manager.create_alias(&endpoint_meta.log_id, &alias)?;
cache_manager.create_alias(&cache_name, &alias)?;
Ok(cache)
}

Expand Down

0 comments on commit 7e7fc35

Please sign in to comment.