diff options
author | Igor Fedotov <igor.fedotov@croit.io> | 2024-09-17 14:35:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 14:35:27 +0200 |
commit | 08cec6974d86f81dc304360b31113f30b4085bf8 (patch) | |
tree | 7fba1556f4ce8cec1ce2320517fb71a94cc8fc4c | |
parent | Merge PR #55421 into main (diff) | |
parent | kv/rocksdb: return error for dump_objectstore_kv_stats asok command (diff) | |
download | ceph-08cec6974d86f81dc304360b31113f30b4085bf8.tar.xz ceph-08cec6974d86f81dc304360b31113f30b4085bf8.zip |
Merge pull request #58728 from ifed01/wip-ifed-ret-error-kv-stats
kv/rocksdb: return error for dump_objectstore_kv_stats asok command
Reviewed-by: Adam Kupczyk <akupczyk@ibm.com>
-rw-r--r-- | src/kv/RocksDBStore.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index c2b0da79ef7..ca63ea06484 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -1417,8 +1417,13 @@ int64_t RocksDBStore::estimate_prefix_size(const string& prefix, void RocksDBStore::get_statistics(Formatter *f) { if (!cct->_conf->rocksdb_perf) { - dout(20) << __func__ << " RocksDB perf is disabled, can't probe for stats" - << dendl; + f->write_raw_data("error: RocksDB perf is disabled, can't probe for stats.\n"); + return; + } + if (!cct->_conf->rocksdb_collect_compaction_stats && + !cct->_conf->rocksdb_collect_extended_stats && + !cct->_conf->rocksdb_collect_memory_stats) { + f->write_raw_data("error: None of rocksdb_collect_* setting is enabled, hence no output.\n"); return; } |