Skip to content

Commit ea80b5f

Browse files
committed
librados,msg: replace obsolete get_tracked_conf_keys()
.. with get_tracked_keys(). Following ceph#61394, all uses of the deprecated interface will be updated, and that old interface will be removed. Signed-off-by: Ronen Friedman <[email protected]>
1 parent 58faf00 commit ea80b5f

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/librados/RadosClient.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ using std::ostringstream;
5555
using std::string;
5656
using std::map;
5757
using std::vector;
58+
using namespace std::literals;
5859

5960
namespace bc = boost::container;
6061
namespace bs = boost::system;
@@ -1169,14 +1170,13 @@ int librados::RadosClient::get_inconsistent_pgs(int64_t pool_id,
11691170
return 0;
11701171
}
11711172

1172-
const char** librados::RadosClient::get_tracked_conf_keys() const
1173+
std::vector<std::string> librados::RadosClient::get_tracked_keys()
1174+
const noexcept
11731175
{
1174-
static const char *config_keys[] = {
1175-
"librados_thread_count",
1176-
"rados_mon_op_timeout",
1177-
nullptr
1176+
return {
1177+
"librados_thread_count"s,
1178+
"rados_mon_op_timeout"s
11781179
};
1179-
return config_keys;
11801180
}
11811181

11821182
void librados::RadosClient::handle_conf_change(const ConfigProxy& conf,

src/librados/RadosClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class librados::RadosClient : public Dispatcher,
191191
mon_feature_t get_required_monitor_features() const;
192192

193193
int get_inconsistent_pgs(int64_t pool_id, std::vector<std::string>* pgs);
194-
const char** get_tracked_conf_keys() const override;
194+
std::vector<std::string> get_tracked_keys() const noexcept override;
195195
void handle_conf_change(const ConfigProxy& conf,
196196
const std::set <std::string> &changed) override;
197197
};

src/msg/compressor_registry.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "compressor_registry.h"
55
#include "common/dout.h"
66

7+
using namespace std::literals;
8+
79
#define dout_subsys ceph_subsys_ms
810
#undef dout_prefix
911
#define dout_prefix *_dout << "CompressorRegistry(" << this << ") "
@@ -19,16 +21,14 @@ CompressorRegistry::~CompressorRegistry()
1921
cct->_conf.remove_observer(this);
2022
}
2123

22-
const char** CompressorRegistry::get_tracked_conf_keys() const
24+
std::vector<std::string> CompressorRegistry::get_tracked_keys() const noexcept
2325
{
24-
static const char *keys[] = {
25-
"ms_osd_compress_mode",
26-
"ms_osd_compression_algorithm",
27-
"ms_osd_compress_min_size",
28-
"ms_compress_secure",
29-
nullptr
26+
return {
27+
"ms_osd_compress_mode"s,
28+
"ms_osd_compression_algorithm"s,
29+
"ms_osd_compress_min_size"s,
30+
"ms_compress_secure"s
3031
};
31-
return keys;
3232
}
3333

3434
void CompressorRegistry::handle_conf_change(

src/msg/compressor_registry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CompressorRegistry : public md_config_obs_t {
2121
_refresh_config();
2222
}
2323

24-
const char** get_tracked_conf_keys() const override;
24+
std::vector<std::string> get_tracked_keys() const noexcept override;
2525
void handle_conf_change(const ConfigProxy& conf,
2626
const std::set<std::string>& changed) override;
2727

0 commit comments

Comments
 (0)