summaryrefslogtreecommitdiffstats
path: root/src/kv/RocksDBStore.cc
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2021-07-27 04:31:41 +0200
committerGitHub <noreply@github.com>2021-07-27 04:31:41 +0200
commitd637dcda2265752ff973e4eff64528cd7280ae58 (patch)
tree24c7648dc6ea7b9b53ef1b9073889118e1338fac /src/kv/RocksDBStore.cc
parentMerge PR #42292 into master (diff)
parent*: drop strict_iecstrtoll(const char *str,..) (diff)
downloadceph-d637dcda2265752ff973e4eff64528cd7280ae58.tar.xz
ceph-d637dcda2265752ff973e4eff64528cd7280ae58.zip
Merge pull request #42485 from tchaikov/wip-strtoll
common/strtol: replace `const char*` with `std::string_view` Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to 'src/kv/RocksDBStore.cc')
-rw-r--r--src/kv/RocksDBStore.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc
index b826bb959d8..e5aa6f106f0 100644
--- a/src/kv/RocksDBStore.cc
+++ b/src/kv/RocksDBStore.cc
@@ -319,14 +319,14 @@ int RocksDBStore::tryInterpret(const string &key, const string &val, rocksdb::Op
{
if (key == "compaction_threads") {
std::string err;
- int f = strict_iecstrtoll(val.c_str(), &err);
+ int f = strict_iecstrtoll(val, &err);
if (!err.empty())
return -EINVAL;
//Low priority threadpool is used for compaction
opt.env->SetBackgroundThreads(f, rocksdb::Env::Priority::LOW);
} else if (key == "flusher_threads") {
std::string err;
- int f = strict_iecstrtoll(val.c_str(), &err);
+ int f = strict_iecstrtoll(val, &err);
if (!err.empty())
return -EINVAL;
//High priority threadpool is used for flusher
@@ -960,7 +960,7 @@ int RocksDBStore::verify_sharding(const rocksdb::Options& opt,
size_t cache_size = cct->_conf->rocksdb_cache_size;
if (auto it = cache_options_map.find("size"); it !=cache_options_map.end()) {
std::string error;
- cache_size = strict_iecstrtoll(it->second.c_str(), &error);
+ cache_size = strict_iecstrtoll(it->second, &error);
if (!error.empty()) {
derr << __func__ << " invalid size: '" << it->second << "'" << dendl;
}