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
Added naming of backup engine threads #2053
Conversation
In this case the background worker thread is actually thread 19. Thread 1 is the user thread who's calling CreateNewBackup, we don't want to rename this one. |
These are the threads we want to rename: https://github.com/facebook/rocksdb/blob/master/utilities/backupable/backupable_db.cc#L649-L660 |
@s-sharan updated the pull request - view changes |
@@ -647,6 +647,7 @@ Status BackupEngineImpl::Initialize() { | |||
// background | |||
for (int t = 0; t < options_.max_background_operations; t++) { | |||
threads_.emplace_back([this]() { | |||
pthread_setname_np(pthread_self(), "backup_engine"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's glibc-specific, maybe conditionally compile this line using #ifdef OS_LINUX
@s-sharan updated the pull request - view changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your contribution to RocksDB! 👍
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Changed the naming of backup engine threads from "ldb" to "backup_engine"
Test Plan: