Added naming of backup engine threads

Summary:
Changed the naming of backup engine threads from "ldb" to "backup_engine"
Closes https://github.com/facebook/rocksdb/pull/2053

Differential Revision: D4799325

Pulled By: ajkr

fbshipit-source-id: 046893f
main
Sharan Suryanarayanan 8 years ago committed by Facebook Github Bot
parent 67d7623794
commit 8d3cb4f207
  1. 6
      utilities/backupable/backupable_db.cc

@ -647,6 +647,11 @@ Status BackupEngineImpl::Initialize() {
// background // background
for (int t = 0; t < options_.max_background_operations; t++) { for (int t = 0; t < options_.max_background_operations; t++) {
threads_.emplace_back([this]() { threads_.emplace_back([this]() {
#if defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 12)
pthread_setname_np(pthread_self(), "backup_engine");
#endif
#endif
CopyOrCreateWorkItem work_item; CopyOrCreateWorkItem work_item;
while (files_to_copy_or_create_.read(work_item)) { while (files_to_copy_or_create_.read(work_item)) {
CopyOrCreateResult result; CopyOrCreateResult result;
@ -659,7 +664,6 @@ Status BackupEngineImpl::Initialize() {
} }
}); });
} }
ROCKS_LOG_INFO(options_.info_log, "Initialized BackupEngine"); ROCKS_LOG_INFO(options_.info_log, "Initialized BackupEngine");
return Status::OK(); return Status::OK();

Loading…
Cancel
Save