summaryrefslogtreecommitdiff
path: root/src/mongo/db/free_mon
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:21:01 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:59:35 -0400
commitc36f9ecb91e49da7e637863889804fc4e6c6c05e (patch)
tree64d8aadb6d29042d4f4e7366bc1457e4e0612383 /src/mongo/db/free_mon
parentc9548e729c8fecd9d7a9a5dd341da0433194ac73 (diff)
downloadmongo-c36f9ecb91e49da7e637863889804fc4e6c6c05e.tar.gz
SERVER-39339 Remove `stdx/memory.h`
Diffstat (limited to 'src/mongo/db/free_mon')
-rw-r--r--src/mongo/db/free_mon/free_mon_controller_test.cpp8
-rw-r--r--src/mongo/db/free_mon/free_mon_mongod.cpp24
2 files changed, 16 insertions, 16 deletions
diff --git a/src/mongo/db/free_mon/free_mon_controller_test.cpp b/src/mongo/db/free_mon/free_mon_controller_test.cpp
index 6892cd034b4..0ad7a139dc6 100644
--- a/src/mongo/db/free_mon/free_mon_controller_test.cpp
+++ b/src/mongo/db/free_mon/free_mon_controller_test.cpp
@@ -34,6 +34,7 @@
#include <boost/filesystem.hpp>
#include <future>
#include <iostream>
+#include <memory>
#include <snappy.h>
#include "mongo/db/free_mon/free_mon_controller.h"
@@ -63,7 +64,6 @@
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
#include "mongo/rpc/object_check.h"
-#include "mongo/stdx/memory.h"
#include "mongo/unittest/barrier.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/unittest/unittest.h"
@@ -420,7 +420,7 @@ void FreeMonControllerTest::setUp() {
_opCtx = cc().makeOperationContext();
- //_storage = stdx::make_unique<repl::StorageInterfaceImpl>();
+ //_storage = std::make_unique<repl::StorageInterfaceImpl>();
repl::StorageInterface::set(service, std::make_unique<repl::StorageInterfaceImpl>());
// Transition to PRIMARY so that the server can accept writes.
@@ -889,8 +889,8 @@ struct ControllerHolder {
ControllerHolder(executor::ThreadPoolTaskExecutor* pool,
FreeMonNetworkInterfaceMock::Options opts,
bool useCrankForTest = true) {
- auto registerCollectorUnique = stdx::make_unique<FreeMonMetricsCollectorMock>();
- auto metricsCollectorUnique = stdx::make_unique<FreeMonMetricsCollectorMock>();
+ auto registerCollectorUnique = std::make_unique<FreeMonMetricsCollectorMock>();
+ auto metricsCollectorUnique = std::make_unique<FreeMonMetricsCollectorMock>();
// If we want to manually turn the crank the queue, we must process the messages
// synchronously
diff --git a/src/mongo/db/free_mon/free_mon_mongod.cpp b/src/mongo/db/free_mon/free_mon_mongod.cpp
index b6c150f5e64..03417b71425 100644
--- a/src/mongo/db/free_mon/free_mon_mongod.cpp
+++ b/src/mongo/db/free_mon/free_mon_mongod.cpp
@@ -81,7 +81,7 @@ auto makeTaskExecutor(ServiceContext* /*serviceContext*/) {
tpOptions.onCreateThread = [](const std::string& threadName) {
Client::initThread(threadName.c_str());
};
- return stdx::make_unique<executor::ThreadPoolTaskExecutor>(
+ return std::make_unique<executor::ThreadPoolTaskExecutor>(
std::make_unique<ThreadPool>(tpOptions), executor::makeNetworkInterface("FreeMonNet"));
}
@@ -285,23 +285,23 @@ void registerCollectors(FreeMonController* controller) {
// These are collected only at registration
//
// CmdBuildInfo
- controller->addRegistrationCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addRegistrationCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"buildInfo", "buildInfo", "", BSON("buildInfo" << 1)));
// HostInfoCmd
- controller->addRegistrationCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addRegistrationCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"hostInfo", "hostInfo", "", BSON("hostInfo" << 1)));
// Add storageEngine section from serverStatus
controller->addRegistrationCollector(
- stdx::make_unique<FreeMonLocalStorageEngineStatusCollector>());
+ std::make_unique<FreeMonLocalStorageEngineStatusCollector>());
// Gather one document from local.clustermanager
- controller->addRegistrationCollector(stdx::make_unique<FreeMonLocalClusterManagerCollector>());
+ controller->addRegistrationCollector(std::make_unique<FreeMonLocalClusterManagerCollector>());
// These are periodically for metrics upload
//
- controller->addMetricsCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addMetricsCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"getDiagnosticData", "diagnosticData", "", BSON("getDiagnosticData" << 1)));
// These are collected at registration and as metrics periodically
@@ -309,10 +309,10 @@ void registerCollectors(FreeMonController* controller) {
if (repl::ReplicationCoordinator::get(getGlobalServiceContext())->getReplicationMode() !=
repl::ReplicationCoordinator::modeNone) {
// CmdReplSetGetConfig
- controller->addRegistrationCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addRegistrationCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"replSetGetConfig", "replSetGetConfig", "", BSON("replSetGetConfig" << 1)));
- controller->addMetricsCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addMetricsCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"replSetGetConfig", "replSetGetConfig", "", BSON("replSetGetConfig" << 1)));
// Collect UUID for certain collections.
@@ -323,10 +323,10 @@ void registerCollectors(FreeMonController* controller) {
std::make_unique<FreeMonNamespaceUUIDCollector>(namespaces));
}
- controller->addRegistrationCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addRegistrationCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"isMaster", "isMaster", "", BSON("isMaster" << 1)));
- controller->addMetricsCollector(stdx::make_unique<FTDCSimpleInternalCommandCollector>(
+ controller->addMetricsCollector(std::make_unique<FTDCSimpleInternalCommandCollector>(
"isMaster", "isMaster", "", BSON("isMaster" << 1)));
}
@@ -344,7 +344,7 @@ void startFreeMonitoring(ServiceContext* serviceContext) {
auto network = std::unique_ptr<FreeMonNetworkInterface>(new FreeMonNetworkHttp(serviceContext));
- auto controller = stdx::make_unique<FreeMonController>(std::move(network));
+ auto controller = std::make_unique<FreeMonController>(std::move(network));
auto controllerPtr = controller.get();
@@ -392,7 +392,7 @@ void notifyFreeMonitoringOnTransitionToPrimary() {
}
void setupFreeMonitoringOpObserver(OpObserverRegistry* registry) {
- registry->addObserver(stdx::make_unique<FreeMonOpObserver>());
+ registry->addObserver(std::make_unique<FreeMonOpObserver>());
}
} // namespace mongo