Skip to content

Commit 08cec69

Browse files
authored
Merge pull request ceph#58728 from ifed01/wip-ifed-ret-error-kv-stats
kv/rocksdb: return error for dump_objectstore_kv_stats asok command Reviewed-by: Adam Kupczyk <[email protected]>
2 parents 8bd63f8 + 56504d2 commit 08cec69

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/kv/RocksDBStore.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,8 +1417,13 @@ int64_t RocksDBStore::estimate_prefix_size(const string& prefix,
14171417
void RocksDBStore::get_statistics(Formatter *f)
14181418
{
14191419
if (!cct->_conf->rocksdb_perf) {
1420-
dout(20) << __func__ << " RocksDB perf is disabled, can't probe for stats"
1421-
<< dendl;
1420+
f->write_raw_data("error: RocksDB perf is disabled, can't probe for stats.\n");
1421+
return;
1422+
}
1423+
if (!cct->_conf->rocksdb_collect_compaction_stats &&
1424+
!cct->_conf->rocksdb_collect_extended_stats &&
1425+
!cct->_conf->rocksdb_collect_memory_stats) {
1426+
f->write_raw_data("error: None of rocksdb_collect_* setting is enabled, hence no output.\n");
14221427
return;
14231428
}
14241429

0 commit comments

Comments
 (0)