librgw: cleanup, move 3 prints to log channel

Save a pointer to CephContext in RGWProcess for use by logger--
using the existing pointer in ThreadPool would be an intrusive
change.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Matt Benjamin 2016-01-14 12:42:08 -05:00
parent 7ef64851b1
commit e68600bef5
3 changed files with 12 additions and 15 deletions

View File

@ -81,7 +81,7 @@ namespace rgw {
void RGWLibProcess::run()
{
while (! shutdown) {
std::cout << "RGWLibProcess GC" << std::endl;
lsubdout(cct, rgw, 5) << "RGWLibProcess GC" << dendl;
unique_lock uniq(mtx);
restart:
int cur_gen = gen;

View File

@ -887,9 +887,9 @@ public:
}
bool eof() {
std::cout << "READDIR offset: " << *offset
<< " is_truncated: " << is_truncated
<< std::endl;
lsubdout(cct, rgw, 15) << "READDIR offset: " << *offset
<< " is_truncated: " << is_truncated
<< dendl;
return !is_truncated;
}
@ -921,8 +921,6 @@ public:
marker.name += "/";
marker.name += sm;
}
std::cout << __func__ << " offset: " << *offset
<< " marker: " << marker << std::endl;
default_max = 1000; // XXX was being omitted
magic = 72;
op = this;
@ -1055,10 +1053,10 @@ public:
}
bool eof() {
std::cout << "READDIR offset: " << *offset
<< " next marker: " << next_marker
<< " is_truncated: " << is_truncated
<< std::endl;
lsubdout(cct, rgw, 15) << "READDIR offset: " << *offset
<< " next marker: " << next_marker
<< " is_truncated: " << is_truncated
<< dendl;
return !is_truncated;
}

View File

@ -35,6 +35,7 @@ class RGWFrontendConfig;
class RGWProcess {
deque<RGWRequest*> m_req_queue;
protected:
CephContext *cct;
RGWRados* store;
OpsLogSocket* olog;
ThreadPool m_tp;
@ -94,13 +95,11 @@ protected:
public:
RGWProcess(CephContext* cct, RGWProcessEnv* pe, int num_threads,
RGWFrontendConfig* _conf)
: store(pe->store), olog(pe->olog),
RGWFrontendConfig* _conf)
: cct(cct), store(pe->store), olog(pe->olog),
m_tp(cct, "RGWProcess::m_tp", "tp_rgw_process", num_threads),
req_throttle(cct, "rgw_ops", num_threads * 2),
rest(pe->rest),
conf(_conf),
sock_fd(-1),
rest(pe->rest), conf(_conf), sock_fd(-1),
req_wq(this, g_conf->rgw_op_thread_timeout,
g_conf->rgw_op_thread_suicide_timeout, &m_tp) {}