summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-03-23 10:04:42 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-24 20:22:44 +0000
commitedb8778350326d2b33f056b1b5f0b25a4b5b444a (patch)
tree15afcaa7a707be0872b764cd054aee55d855ba92 /src/mongo/s
parent51b338ad41653a8188adcc67b682ea12bbe63b4d (diff)
downloadmongo-edb8778350326d2b33f056b1b5f0b25a4b5b444a.tar.gz
SERVER-47040 LOGV2_FATAL also fasserts
Added LOGV2_FATAL_NOTRACE and LOGV2_CONTINUE to have different behavior.
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/client/shard_registry.cpp6
-rw-r--r--src/mongo/s/server.cpp22
-rw-r--r--src/mongo/s/sharding_task_executor.cpp20
3 files changed, 24 insertions, 24 deletions
diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp
index 9bfa02546e9..532f926c734 100644
--- a/src/mongo/s/client/shard_registry.cpp
+++ b/src/mongo/s/client/shard_registry.cpp
@@ -240,11 +240,10 @@ void ShardRegistry::startup(OperationContext* opCtx) {
}
if (!status.isOK()) {
- LOGV2_FATAL(22737,
+ LOGV2_FATAL(40252,
"Error scheduling shard registry reload caused by {error}",
"Error scheduling shard registry reload",
"error"_attr = redact(status.getStatus()));
- fassertFailed(40252);
}
}
@@ -285,11 +284,10 @@ void ShardRegistry::_internalReload(const CallbackArgs& cbArgs) {
}
if (!status.isOK()) {
- LOGV2_FATAL(22738,
+ LOGV2_FATAL(40253,
"Error scheduling shard registry reload caused by {error}",
"Error scheduling shard registry reload",
"error"_attr = redact(status.getStatus()));
- fassertFailed(40253);
}
}
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 04600263475..281d7eecccf 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -818,11 +818,12 @@ ExitCode mongoSMain(int argc, char* argv[], char** envp) {
Status status = runGlobalInitializers(argc, argv, envp);
if (!status.isOK()) {
- LOGV2_FATAL_OPTIONS(22865,
- {logComponentV1toV2(LogComponent::kDefault)},
- "Error during global initialization: {error}",
- "Error during global initialization",
- "error"_attr = status);
+ LOGV2_FATAL_OPTIONS(
+ 22865,
+ logv2::LogOptions(logv2::LogComponent::kDefault, logv2::FatalMode::kContinue),
+ "Error during global initialization: {error}",
+ "Error during global initialization",
+ "error"_attr = status);
return EXIT_ABRUPT;
}
@@ -830,11 +831,12 @@ ExitCode mongoSMain(int argc, char* argv[], char** envp) {
setGlobalServiceContext(ServiceContext::make());
} catch (...) {
auto cause = exceptionToStatus();
- LOGV2_FATAL_OPTIONS(22866,
- {logComponentV1toV2(LogComponent::kDefault)},
- "Error creating service context: {error}",
- "Error creating service context",
- "error"_attr = redact(cause));
+ LOGV2_FATAL_OPTIONS(
+ 22866,
+ logv2::LogOptions(logv2::LogComponent::kDefault, logv2::FatalMode::kContinue),
+ "Error creating service context: {error}",
+ "Error creating service context",
+ "error"_attr = redact(cause));
return EXIT_ABRUPT;
}
diff --git a/src/mongo/s/sharding_task_executor.cpp b/src/mongo/s/sharding_task_executor.cpp
index aeb21e740db..704c4b45166 100644
--- a/src/mongo/s/sharding_task_executor.cpp
+++ b/src/mongo/s/sharding_task_executor.cpp
@@ -191,15 +191,15 @@ StatusWith<TaskExecutor::CallbackHandle> ShardingTaskExecutor::scheduleRemoteCom
}
if (isMongos() && args.response.status == ErrorCodes::IncompatibleWithUpgradedServer) {
- LOGV2_FATAL(22873,
- "This mongos server must be upgraded. It is attempting to communicate "
- "with "
- "an upgraded cluster with which it is incompatible. Error: "
- "'{args_response_status}' Crashing in order to bring attention to the "
- "incompatibility, rather "
- "than erroring endlessly.",
- "args_response_status"_attr = args.response.status.toString());
- fassertNoTrace(50710, false);
+ LOGV2_FATAL_NOTRACE(
+ 50710,
+ "This mongos server must be upgraded. It is attempting to communicate "
+ "with "
+ "an upgraded cluster with which it is incompatible. Error: "
+ "'{args_response_status}' Crashing in order to bring attention to the "
+ "incompatibility, rather "
+ "than erroring endlessly.",
+ "args_response_status"_attr = args.response.status.toString());
}
if (shard) {
@@ -238,7 +238,7 @@ StatusWith<TaskExecutor::CallbackHandle> ShardingTaskExecutor::scheduleRemoteCom
auto shardConn = ConnectionString::parse(target.toString());
if (!shardConn.isOK()) {
- LOGV2_FATAL(22874,
+ LOGV2_ERROR(22874,
"got bad host string in saveGLEStats: {target}",
"target"_attr = target);
}