Skip to content

Commit

Permalink
chore(storage): rename field with _v2 (#17166)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Jun 7, 2024
1 parent f52d177 commit 8d16088
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 62 deletions.
8 changes: 4 additions & 4 deletions src/ctl/src/common/hummock_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ impl HummockServiceOpts {

let opts = self.get_storage_opts();

let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(opts.meta_cache_capacity_mb * (1 << 20))
.with_shards(opts.meta_cache_shard_num)
.storage()
.build()
.await?;
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(opts.block_cache_capacity_mb * (1 << 20))
.with_shards(opts.block_cache_shard_num)
.storage()
Expand All @@ -190,8 +190,8 @@ impl HummockServiceOpts {
state_store_metrics: Arc::new(global_hummock_state_store_metrics(
MetricLevel::Disabled,
)),
meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
})))
}
}
8 changes: 4 additions & 4 deletions src/jni_core/src/hummock_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ impl HummockJavaBindingIterator {
.await,
);

let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(1 << 10)
.with_shards(2)
.storage()
.build()
.map_err(HummockError::foyer_error)
.map_err(StorageError::from)
.await?;
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(1 << 10)
.with_shards(2)
.storage()
Expand All @@ -105,8 +105,8 @@ impl HummockJavaBindingIterator {
state_store_metrics: Arc::new(global_hummock_state_store_metrics(
MetricLevel::Disabled,
)),
meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
}));
let reader = HummockVersionReader::new(
sstable_store,
Expand Down
8 changes: 4 additions & 4 deletions src/storage/benches/bench_compactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ pub async fn mock_sstable_store() -> SstableStoreRef {
);
let store = Arc::new(ObjectStoreImpl::InMem(store));
let path = "test".to_string();
let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(64 << 20)
.with_shards(2)
.storage()
.build()
.await
.unwrap();
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(128 << 20)
.with_shards(2)
.storage()
Expand All @@ -81,8 +81,8 @@ pub async fn mock_sstable_store() -> SstableStoreRef {
recent_filter: None,
state_store_metrics: Arc::new(global_hummock_state_store_metrics(MetricLevel::Disabled)),

meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
}))
}

Expand Down
8 changes: 4 additions & 4 deletions src/storage/benches/bench_multi_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ async fn build_tables<F: SstableWriterFactory>(
}

async fn generate_sstable_store(object_store: Arc<ObjectStoreImpl>) -> Arc<SstableStore> {
let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(64 << 20)
.with_shards(2)
.storage()
.build()
.await
.unwrap();
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(128 << 20)
.with_shards(2)
.storage()
Expand All @@ -153,8 +153,8 @@ async fn generate_sstable_store(object_store: Arc<ObjectStoreImpl>) -> Arc<Sstab
max_prefetch_block_number: 16,
recent_filter: None,
state_store_metrics: Arc::new(global_hummock_state_store_metrics(MetricLevel::Disabled)),
meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
}))
}

Expand Down
8 changes: 4 additions & 4 deletions src/storage/hummock_test/src/bin/replay/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ async fn create_replay_hummock(r: Record, args: &Args) -> Result<impl GlobalRepl
)
.await;

let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(storage_opts.meta_cache_capacity_mb * (1 << 20))
.with_shards(storage_opts.meta_cache_shard_num)
.storage()
.build()
.await
.unwrap();
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(storage_opts.block_cache_capacity_mb * (1 << 20))
.with_shards(storage_opts.block_cache_shard_num)
.storage()
Expand All @@ -132,8 +132,8 @@ async fn create_replay_hummock(r: Record, args: &Args) -> Result<impl GlobalRepl
max_prefetch_block_number: storage_opts.max_prefetch_block_number,
recent_filter: None,
state_store_metrics: state_store_metrics.clone(),
meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
}));

let (hummock_meta_client, notification_client, notifier) = {
Expand Down
8 changes: 4 additions & 4 deletions src/storage/src/hummock/iterator/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ pub async fn mock_sstable_store() -> SstableStoreRef {

pub async fn mock_sstable_store_with_object_store(store: ObjectStoreRef) -> SstableStoreRef {
let path = "test".to_string();
let meta_cache_v2 = HybridCacheBuilder::new()
let meta_cache = HybridCacheBuilder::new()
.memory(64 << 20)
.with_shards(2)
.storage()
.build()
.await
.unwrap();
let block_cache_v2 = HybridCacheBuilder::new()
let block_cache = HybridCacheBuilder::new()
.memory(64 << 20)
.with_shards(2)
.storage()
Expand All @@ -91,8 +91,8 @@ pub async fn mock_sstable_store_with_object_store(store: ObjectStoreRef) -> Ssta
recent_filter: None,
state_store_metrics: Arc::new(global_hummock_state_store_metrics(MetricLevel::Disabled)),

meta_cache_v2,
block_cache_v2,
meta_cache,
block_cache,
}))
}

Expand Down
Loading

0 comments on commit 8d16088

Please sign in to comment.