diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2018-11-01 18:51:15 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2018-11-08 18:35:00 -0500 |
commit | aff889b39301472bd2143967938a3dba468dfc63 (patch) | |
tree | 2ee4fcec926d96a674690e390d5b916b4b9c7a3b /src/mongo/db/index_builder.cpp | |
parent | 4fb38d9c10123321dada6fe1be477f9cb99732a7 (diff) | |
download | mongo-aff889b39301472bd2143967938a3dba468dfc63.tar.gz |
SERVER-36473 Make a dedicated RAII class to manage Client lifetime
Diffstat (limited to 'src/mongo/db/index_builder.cpp')
-rw-r--r-- | src/mongo/db/index_builder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/index_builder.cpp b/src/mongo/db/index_builder.cpp index a95b20674f7..dde059c7254 100644 --- a/src/mongo/db/index_builder.cpp +++ b/src/mongo/db/index_builder.cpp @@ -120,8 +120,7 @@ std::string IndexBuilder::name() const { } void IndexBuilder::run() { - Client::initThread(name().c_str()); - ON_BLOCK_EXIT([] { Client::destroy(); }); + ThreadClient tc(name(), getGlobalServiceContext()); LOG(2) << "IndexBuilder building index " << _index; auto opCtx = cc().makeOperationContext(); |