uint64_t max_req_id;
public:
- RGWProcess(CephContext *cct, RGWRados *rgwstore, int num_threads, RGWREST *_rest)
- : store(rgwstore), m_tp(cct, "RGWProcess::m_tp", num_threads),
+ RGWProcess(CephContext *cct, RGWRados *rgwstore, OpsLogSocket *_olog, int num_threads, RGWREST *_rest)
+ : store(rgwstore), olog(_olog), m_tp(cct, "RGWProcess::m_tp", num_threads),
req_throttle(cct, "rgw_ops", num_threads * 2),
- rest(_rest),
+ rest(_rest), sock_fd(-1),
req_wq(this, g_conf->rgw_op_thread_timeout,
g_conf->rgw_op_thread_suicide_timeout, &m_tp),
max_req_id(0) {}
rest.register_resource(g_conf->rgw_admin_entry, admin_resource);
}
- pprocess = new RGWProcess(g_ceph_context, store, g_conf->rgw_thread_pool_size, &rest);
+ OpsLogSocket *olog = NULL;
+
+ if (!g_conf->rgw_ops_log_socket_path.empty()) {
+ olog = new OpsLogSocket(g_ceph_context, g_conf->rgw_ops_log_data_backlog);
+ olog->init(g_conf->rgw_ops_log_socket_path);
+ }
+
- RGWProcess process(g_ceph_context, store, olog, g_conf->rgw_thread_pool_size, &rest);
- process.run();
++ pprocess = new RGWProcess(g_ceph_context, store, olog, g_conf->rgw_thread_pool_size, &rest);
+
+ pprocess->run();
+
+ delete pprocess;
if (do_swift) {
swift_finalize();