rocksdb/tools
chuhao zeng 8d50a7c9df Fix ldbcmd cant use custom comparator (#12159)
Summary:
According to this [Q&A](https://github.com/facebook/rocksdb/wiki/RocksDB-FAQ#:~:text=Q%3A%20If%20I%20use%20non%2Ddefault%20comparators%20or%20merge%20operators%2C%20can%20I%20still%20use%20ldb%20tool%3F), user should be able to use LDB with passing a customized comparator into the option.

In the process of opening DB in order to perform ldb commands, there is a exception saying comparator not match even if a option with customized comparator is provided. After initializing the column family to open DB, the `LDBCommand::OverrideBaseCFOptions` method does not update the comparator inside column family descriptor using the passed in options. This can cause a mismatch while doing version edit, and in function `ToggleUDT CompareComparator` it will failed and return a exception saying comparator not match.

Propose fix by updating the column family descriptor's option using the user passed in option. Also a test case is provided to illustrate the steps.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12159

Reviewed By: hx235

Differential Revision: D52267367

Pulled By: ajkr

fbshipit-source-id: c240f93f440e02cb485893de058a46c6dbf9654b
2023-12-20 18:04:08 -08:00
..
advisor
block_cache_analyzer internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
dump internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
CMakeLists.txt
Dockerfile
analyze_txn_stress_test.sh
auto_sanity_test.sh
backup_db.sh
benchmark.sh add exe and script path check (#11621) 2023-07-19 12:05:24 -07:00
benchmark_ci.py
benchmark_compare.sh
benchmark_leveldb.sh
blob_dump.cc
check_all_python.py
check_format_compatible.sh Update HISTORY/version/format compatibility script for the 8.10 release (#12154) 2023-12-15 14:44:23 -08:00
db_bench.cc
db_bench_tool.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
db_bench_tool_test.cc
db_crashtest.py Intensify operations on same key in crash test (#12148) 2023-12-17 10:46:26 -08:00
db_repl_stress.cc
db_sanity_test.cc
dbench_monitor
generate_random_db.sh
ingest_external_sst.sh
io_tracer_parser.cc
io_tracer_parser_test.cc
io_tracer_parser_tool.cc
io_tracer_parser_tool.h
ldb.cc
ldb_cmd.cc Fix ldbcmd cant use custom comparator (#12159) 2023-12-20 18:04:08 -08:00
ldb_cmd_impl.h GetEntity and PutEntity Support in ldb (#11796) 2023-09-12 16:32:40 -07:00
ldb_cmd_test.cc Fix ldbcmd cant use custom comparator (#12159) 2023-12-20 18:04:08 -08:00
ldb_test.py GetEntity and PutEntity Support in ldb (#11796) 2023-09-12 16:32:40 -07:00
ldb_tool.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
pflag
reduce_levels_test.cc Make option `level_compaction_dynamic_level_bytes` true by default (#11525) 2023-06-15 21:12:39 -07:00
regression_test.sh Fix regression script for async_io benchmarks (#11462) 2023-05-22 15:32:12 -07:00
restore_db.sh
rocksdb_dump_test.sh
run_blob_bench.sh add exe and script path check (#11621) 2023-07-19 12:05:24 -07:00
run_flash_bench.sh
run_leveldb.sh
sample-dump.dmp
simulated_hybrid_file_system.cc
simulated_hybrid_file_system.h
sst_dump.cc
sst_dump_test.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
sst_dump_tool.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
trace_analyzer.cc
trace_analyzer_test.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
trace_analyzer_tool.cc internal_repo_rocksdb (435146444452818992) (#12115) 2023-12-01 11:15:17 -08:00
trace_analyzer_tool.h
verify_random_db.sh
write_external_sst.sh
write_stress.cc
write_stress_runner.py