patch0027
This commit is contained in:
parent
2fec333c00
commit
3d4788fc3e
@ -37,3 +37,55 @@
|
||||
#else
|
||||
virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t),
|
||||
bool thread_safe) override;
|
||||
--- ceph-17.2.6/src/kv/RocksDBStore.cc.orig 2023-04-20 13:27:30.331781763 -0400
|
||||
+++ ceph-17.2.6/src/kv/RocksDBStore.cc 2023-04-20 13:54:20.742215113 -0400
|
||||
@@ -903,6 +903,19 @@
|
||||
// base_name - name of column without shard suffix: "-"+number
|
||||
// options - additional options to apply
|
||||
// cf_opt - column family options to update
|
||||
+
|
||||
+Status GetColumnFamilyOptionsFromMap(
|
||||
+ const ColumnFamilyOptions& base_options,
|
||||
+ const std::unordered_map<std::string, std::string>& opts_map,
|
||||
+ ColumnFamilyOptions* new_options, bool input_strings_escaped,
|
||||
+ bool ignore_unknown_options) {
|
||||
+ ConfigOptions config_options;
|
||||
+ config_options.ignore_unknown_options = ignore_unknown_options;
|
||||
+ config_options.input_strings_escaped = input_strings_escaped;
|
||||
+ return rocksdb::GetColumnFamilyOptionsFromMap(config_options, base_options, opts_map,
|
||||
+ new_options);
|
||||
+}
|
||||
+
|
||||
int RocksDBStore::update_column_family_options(const std::string& base_name,
|
||||
const std::string& more_options,
|
||||
rocksdb::ColumnFamilyOptions* cf_opt)
|
||||
@@ -916,7 +929,7 @@
|
||||
<< " options=" << more_options << dendl;
|
||||
return r;
|
||||
}
|
||||
- status = rocksdb::GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt);
|
||||
+ status = GetColumnFamilyOptionsFromMap(*cf_opt, options_map, cf_opt, false);
|
||||
if (!status.ok()) {
|
||||
dout(5) << __func__ << " invalid column family optionsp; column family="
|
||||
<< base_name << " options=" << more_options << dendl;
|
||||
@@ -937,6 +950,20 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+Status GetBlockBasedTableOptionsFromMap(
|
||||
+ const BlockBasedTableOptions& table_options,
|
||||
+ const std::unordered_map<std::string, std::string>& opts_map,
|
||||
+ BlockBasedTableOptions* new_table_options, bool input_strings_escaped,
|
||||
+ bool ignore_unknown_options) {
|
||||
+ ConfigOptions config_options;
|
||||
+ config_options.input_strings_escaped = input_strings_escaped;
|
||||
+ config_options.ignore_unknown_options = ignore_unknown_options;
|
||||
+ config_options.invoke_prepare_options = false;
|
||||
+
|
||||
+ return rocksdb::GetBlockBasedTableOptionsFromMap(config_options, table_options,
|
||||
+ opts_map, new_table_options);
|
||||
+}
|
||||
+
|
||||
int RocksDBStore::apply_block_cache_options(const std::string& column_name,
|
||||
const std::string& block_cache_opt,
|
||||
rocksdb::ColumnFamilyOptions* cf_opt)
|
||||
|
Loading…
Reference in New Issue
Block a user