diff options
Diffstat (limited to 'src/rgw/rgw_rados.cc')
-rw-r--r-- | src/rgw/rgw_rados.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 680da9f4fc4..d90b4bcae91 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -52,8 +52,6 @@ #include "common/Clock.h" -using namespace librados; - #include <string> #include <iostream> #include <vector> @@ -101,6 +99,8 @@ using namespace librados; #define dout_context g_ceph_context #define dout_subsys ceph_subsys_rgw +using namespace std; +using namespace librados; static string shadow_ns = "shadow"; static string default_bucket_index_pool_suffix = "rgw.buckets.index"; @@ -611,10 +611,16 @@ public: } int process(const DoutPrefixProvider *dpp) override { list<RGWCoroutinesStack*> stacks; + auto metatrimcr = create_meta_log_trim_cr(this, static_cast<rgw::sal::RadosStore*>(store), &http, + cct->_conf->rgw_md_log_max_shards, + trim_interval); + if (!metatrimcr) { + ldpp_dout(dpp, -1) << "Bailing out of trim thread!" << dendl; + return -EINVAL; + } auto meta = new RGWCoroutinesStack(store->ctx(), &crs); - meta->call(create_meta_log_trim_cr(this, static_cast<rgw::sal::RadosStore*>(store), &http, - cct->_conf->rgw_md_log_max_shards, - trim_interval)); + meta->call(metatrimcr); + stacks.push_back(meta); if (store->svc()->zone->sync_module_exports_data()) { |