Skip to content

Commit 7c48905

Browse files
xingbowangmeta-codesync[bot]
authored andcommitted
Fix missing const for arg of OptionChangeMigration (facebook#14173)
Summary: Fix missing const for arg of OptionChangeMigration We switched from std::string to std::string & for API OptionChangeMigration, which caused const qualifier to be lost at call site, which causes compilation failure. Pull Request resolved: facebook#14173 Test Plan: Unit test Reviewed By: pdillinger Differential Revision: D88431457 Pulled By: xingbowang fbshipit-source-id: a705f3b80cc5ff56dab73aa6a31c940798d8df45
1 parent 707e405 commit 7c48905

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/rocksdb/utilities/option_change_migration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace ROCKSDB_NAMESPACE {
2525
// with `Options::compaction_options_fifo.max_table_files_size` > 0 can cause
2626
// the whole DB to be dropped right after migration if the migrated data is
2727
// larger than `max_table_files_size`
28-
Status OptionChangeMigration(std::string& dbname, const Options& old_opts,
28+
Status OptionChangeMigration(const std::string& dbname, const Options& old_opts,
2929
const Options& new_opts);
3030

3131
// Multi-CF version: Prepares a database with multiple column families to be

utilities/option_change_migration/option_change_migration.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Status OptionChangeMigration(
341341
return s;
342342
}
343343

344-
Status OptionChangeMigration(std::string& dbname, const Options& old_opts,
344+
Status OptionChangeMigration(const std::string& dbname, const Options& old_opts,
345345
const Options& new_opts) {
346346
DBOptions old_db_opts(old_opts);
347347
DBOptions new_db_opts(new_opts);

0 commit comments

Comments
 (0)