Skip to content

Commit

Permalink
resolve some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Jun 3, 2024
1 parent c332de6 commit c63dc09
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion e2e_test/batch/catalog/pg_settings.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ internal data_directory
internal parallel_compact_size_mb
internal sstable_size_mb
internal state_store
internal use_new_object_prefix_strategy
postmaster backup_storage_directory
postmaster backup_storage_url
postmaster barrier_interval_ms
postmaster checkpoint_frequency
postmaster enable_tracing
postmaster max_concurrent_creating_streaming_jobs
postmaster pause_on_next_bootstrap
postmaster use_new_object_prefix_strategy
user application_name
user background_ddl
user batch_enable_distributed_dml
Expand Down
1 change: 1 addition & 0 deletions proto/java_binding.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ message ReadPlan {
catalog.Table table_catalog = 7;

repeated uint32 vnode_ids = 8;
bool use_new_object_prefix_strategy = 9;
}
4 changes: 2 additions & 2 deletions src/common/src/system_param/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ macro_rules! for_all_params {
{ max_concurrent_creating_streaming_jobs, u32, Some(1_u32), true, "Max number of concurrent creating streaming jobs.", },
{ pause_on_next_bootstrap, bool, Some(false), true, "Whether to pause all data sources on next bootstrap.", },
{ enable_tracing, bool, Some(false), true, "Whether to enable distributed tracing.", },
{ use_new_object_prefix_strategy, bool, Some(false), true, "Whether to split object prefix.", },
{ use_new_object_prefix_strategy, bool, Some(false), false, "Whether to split object prefix.", },
}
};
}
Expand Down Expand Up @@ -442,7 +442,7 @@ mod tests {
(MAX_CONCURRENT_CREATING_STREAMING_JOBS_KEY, "1"),
(PAUSE_ON_NEXT_BOOTSTRAP_KEY, "false"),
(ENABLE_TRACING_KEY, "true"),
(USE_NEW_OBJECT_PREFIX_STRATEGY_KEY, "true"),
(USE_NEW_OBJECT_PREFIX_STRATEGY_KEY, "false"),
("a_deprecated_param", "foo"),
];

Expand Down
2 changes: 1 addition & 1 deletion src/jni_core/src/hummock_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl HummockJavaBindingIterator {
state_store_metrics: Arc::new(global_hummock_state_store_metrics(
MetricLevel::Disabled,
)),
use_new_object_prefix_strategy: false,
use_new_object_prefix_strategy: read_plan.use_new_object_prefix_strategy,
meta_cache_v2,
block_cache_v2,
}));
Expand Down
2 changes: 1 addition & 1 deletion src/object_store/src/object/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl ObjectStore for S3ObjectStore {

fn get_object_prefix(&self, obj_id: u64, _use_new_object_prefix_strategy: bool) -> String {
// Delegate to static method to avoid creating an `S3ObjectStore` in unit test.
// Using aws s3 sdk as object storage, the object prefix will be devised by default.
// Using aws s3 sdk as object storage, the object prefix will be divided by default.
prefix::s3::get_object_prefix(obj_id)
}

Expand Down
2 changes: 1 addition & 1 deletion src/storage/benches/bench_compactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub async fn mock_sstable_store() -> SstableStoreRef {
max_prefetch_block_number: 16,
recent_filter: None,
state_store_metrics: Arc::new(global_hummock_state_store_metrics(MetricLevel::Disabled)),
use_new_object_prefix_strategy: false,
use_new_object_prefix_strategy: true,

meta_cache_v2,
block_cache_v2,
Expand Down
5 changes: 4 additions & 1 deletion src/storage/hummock_test/src/bin/replay/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ struct Args {

#[arg(short, long)]
object_storage: String,

#[arg(short, long)]
use_new_object_prefix_strategy: bool,
}

#[tokio::main(flavor = "multi_thread")]
Expand Down Expand Up @@ -132,7 +135,7 @@ 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(),
use_new_object_prefix_strategy: false,
use_new_object_prefix_strategy: args.use_new_object_prefix_strategy,
meta_cache_v2,
block_cache_v2,
}));
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/hummock/iterator/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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)),
use_new_object_prefix_strategy: false,
use_new_object_prefix_strategy: true,

meta_cache_v2,
block_cache_v2,
Expand Down

0 comments on commit c63dc09

Please sign in to comment.