diff options
Diffstat (limited to 'src/rgw/rgw_admin.cc')
-rw-r--r-- | src/rgw/rgw_admin.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 80262c20cd9..6d10387fb35 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -8307,7 +8307,13 @@ next: } auto num_shards = g_conf()->rgw_md_log_max_shards; - ret = crs.run(dpp(), create_admin_meta_log_trim_cr(dpp(), static_cast<rgw::sal::RadosStore*>(store), &http, num_shards)); + auto mltcr = create_admin_meta_log_trim_cr( + dpp(), static_cast<rgw::sal::RadosStore*>(store), &http, num_shards); + if (!mltcr) { + cerr << "Cluster misconfigured! Unable to trim." << std::endl; + return -EIO; + } + ret = crs.run(dpp(), mltcr); if (ret < 0) { cerr << "automated mdlog trim failed with " << cpp_strerror(ret) << std::endl; return -ret; |