New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: make sync thread name clear #13324

Merged
merged 1 commit into from Feb 22, 2017

Conversation

Projects
None yet
5 participants
@dongbula

dongbula commented Feb 9, 2017

@@ -2850,6 +2850,7 @@ class RGWRadosThread {
virtual uint64_t interval_msec() = 0;
virtual void stop_process() {}
public:
string thread_name;

This comment has been minimized.

@Liuchang0812

Liuchang0812 Feb 9, 2017

Contributor

how about moving thread_name to private section?

This comment has been minimized.

@dongbula

dongbula Feb 9, 2017

aye, that is better

@@ -2933,7 +2934,7 @@ class RGWMetaNotifier : public RGWRadosThread {
}
public:
RGWMetaNotifier(RGWRados *_store, RGWMetadataLog* log)
: RGWRadosThread(_store), notify_mgr(_store), log(log) {}
: RGWRadosThread(_store), notify_mgr(_store), log(log) {thread_name = "meta-notifier";}

This comment has been minimized.

@Liuchang0812

Liuchang0812 Feb 9, 2017

Contributor

Maybe
RGWRadosThread(_store), notify_mgr(_store), log(log), thread_name("meta-notifier") { }

This comment has been minimized.

@dongbula

dongbula Feb 9, 2017

that may cause some compile problems

virtual uint64_t interval_msec() = 0;
virtual void stop_process() {}
public:
RGWRadosThread(RGWRados *_store) : worker(NULL), cct(_store->ctx()), store(_store) {}
RGWRadosThread(RGWRados *_store) : worker(NULL), cct(_store->ctx()), store(_store), thread_name("radosgw") {}

This comment has been minimized.

@yehudasa

yehudasa Feb 9, 2017

Member

@dongbula can you pass the thread_name as a param in the constructor?

This comment has been minimized.

@cbodley

cbodley Feb 9, 2017

Contributor

i have a similar patch in another pr, see 9462afa as an example

This comment has been minimized.

@dongbula

dongbula Feb 10, 2017

@yehudasa well, that's good
@cbodley fine, I didn't notice that, it's duplicate work, maybe I should close this pr?

This comment has been minimized.

@cbodley

cbodley Feb 10, 2017

Contributor

no, please continue :) mine will take a while to merge, let's get yours in first

@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Feb 16, 2017

@dongbula rebase it please

@dongbula

This comment has been minimized.

dongbula commented Feb 16, 2017

@Liuchang0812 done, thanks

virtual uint64_t interval_msec() = 0;
virtual void stop_process() {}
public:
RGWRadosThread(RGWRados *_store) : worker(NULL), cct(_store->ctx()), store(_store) {}
RGWRadosThread(RGWRados *_store, string thread_name = "radosgw")

This comment has been minimized.

@cbodley

cbodley Feb 16, 2017

Contributor

pass the string by const ref to avoid an extra copy, const string& thread_name = "radosgw"

(same with the RGWSyncProcessorThread constructor)

This comment has been minimized.

@dongbula
lvshuhua
rgw: make sync thread name clear
Fixes: http://tracker.ceph.com/issues/18860
Signed-off-by: lvshuhua <lvshuhua@cmss.chinamobile.com>

@cbodley cbodley merged commit abb6eec into ceph:master Feb 22, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@dongbula dongbula deleted the dongbula:make-sync-thread-name-clear branch Feb 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment