del_op.params.obj_owner = obj_owner;
del_op.params.unmod_since = meta.mtime;
- if (perfcounter) {
- perfcounter->inc(l_rgw_lc_remove_expired, 1);
- }
-
return del_op.delete_obj(null_yield);
} /* remove_expired_obj */
return;
}
RGWObjectCtx rctx(store);
- ret = abort_multipart_upload(store, cct, &rctx, bucket_info, mp_obj);
- if (ret < 0 && ret != -ERR_NO_SUCH_UPLOAD) {
- ldpp_dout(wk->get_lc(), 0)
- << "ERROR: abort_multipart_upload failed, ret=" << ret
- << wq->thr_name()
- << ", meta:" << obj.key
- << dendl;
- } else if (ret == -ERR_NO_SUCH_UPLOAD) {
- ldpp_dout(wk->get_lc(), 5)
- << "ERROR: abort_multipart_upload failed, ret=" << ret
- << wq->thr_name()
- << ", meta:" << obj.key
- << dendl;
- }
+ int ret = abort_multipart_upload(store, cct, &rctx, bucket_info, mp_obj);
+ if (ret == 0) {
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_abort_mpu, 1);
+ }
+ } else {
+ if (ret == -ERR_NO_SUCH_UPLOAD) {
+ ldpp_dout(wk->get_lc(), 5)
+ << "ERROR: abort_multipart_upload failed, ret=" << ret
+ << wq->thr_name()
+ << ", meta:" << obj.key
+ << dendl;
+ } else {
+ ldpp_dout(wk->get_lc(), 0)
+ << "ERROR: abort_multipart_upload failed, ret=" << ret
+ << wq->thr_name()
+ << ", meta:" << obj.key
+ << dendl;
+ }
+ } /* abort failed */
} /* expired */
};
<< oc.wq->thr_name() << dendl;
return r;
}
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_expire_current, 1);
+ }
ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key
<< " " << oc.wq->thr_name() << dendl;
}
<< " " << oc.wq->thr_name() << dendl;
return r;
}
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_expire_noncurrent, 1);
+ }
ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key
<< " (non-current expiration) "
<< oc.wq->thr_name() << dendl;
<< dendl;
return r;
}
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_expire_dm, 1);
+ }
ldout(oc.cct, 2) << "DELETED:" << oc.bucket_info.bucket << ":" << o.key
<< " (delete marker expiration) "
<< oc.wq->thr_name() << dendl;
public:
LCOpAction_CurrentTransition(const transition_action& _transition)
: LCOpAction_Transition(_transition) {}
+ int process(lc_op_ctx& oc) {
+ int r = LCOpAction_Transition::process(oc);
+ if (r == 0) {
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_transition_current, 1);
+ }
+ }
+ return r;
+ }
};
class LCOpAction_NonCurrentTransition : public LCOpAction_Transition {
const transition_action& _transition)
: LCOpAction_Transition(_transition)
{}
+ int process(lc_op_ctx& oc) {
+ int r = LCOpAction_Transition::process(oc);
+ if (r == 0) {
+ if (perfcounter) {
+ perfcounter->inc(l_rgw_lc_transition_noncurrent, 1);
+ }
+ }
+ return r;
+ }
};
void LCOpRule::build()
o.push_back(new RGWLifecycleConfiguration);
}
-void get_lc_oid(CephContext *cct, const string& shard_id, string *oid)
+static inline void get_lc_oid(CephContext *cct,
+ const string& shard_id, string *oid)
{
int max_objs =
(cct->_conf->rgw_lc_max_objs > HASH_PRIME ? HASH_PRIME :
plb.add_u64_counter(l_rgw_keystone_token_cache_miss, "keystone_token_cache_miss", "Keystone token cache miss");
plb.add_u64_counter(l_rgw_gc_retire, "gc_retire_object", "GC object retires");
- plb.add_u64_counter(l_rgw_lc_remove_expired, "lc_remove_expired", "LC removed objects");
+
+ plb.add_u64_counter(l_rgw_lc_expire_current, "lc_expire_current",
+ "Lifecycle current expiration");
+ plb.add_u64_counter(l_rgw_lc_expire_noncurrent, "lc_expire_noncurrent",
+ "Lifecycle non-current expiration");
+ plb.add_u64_counter(l_rgw_lc_expire_dm, "lc_expire_dm",
+ "Lifecycle delete-marker expiration");
+ plb.add_u64_counter(l_rgw_lc_transition_current, "lc_transition_current",
+ "Lifecycle current transition");
+ plb.add_u64_counter(l_rgw_lc_transition_noncurrent,
+ "lc_transition_noncurrent",
+ "Lifecycle non-current transition");
+ plb.add_u64_counter(l_rgw_lc_abort_mpu, "lc_abort_mpu",
+ "Lifecycle abort multipart upload");
plb.add_u64_counter(l_rgw_pubsub_event_triggered, "pubsub_event_triggered", "Pubsub events with at least one topic");
plb.add_u64_counter(l_rgw_pubsub_event_lost, "pubsub_event_lost", "Pubsub events lost");