summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-03-07 11:17:15 -0500
committerBenety Goh <benety@mongodb.com>2018-03-07 11:17:15 -0500
commit0bc90017e2563ed7432d56051483763c91d28025 (patch)
treefa5cf99edf9450fff0af857859273b8e3e3e9741
parent6c5546598ccc1d9818a07a044fcc81db0bf030a2 (diff)
downloadmongo-0bc90017e2563ed7432d56051483763c91d28025.tar.gz
SERVER-24635 replace references to fassertStatusOK with fassert
-rw-r--r--src/mongo/db/catalog/catalog_control.cpp18
-rw-r--r--src/mongo/db/catalog/database_impl.cpp6
-rw-r--r--src/mongo/db/catalog/drop_database.cpp2
-rw-r--r--src/mongo/db/catalog/index_create_impl.cpp18
-rw-r--r--src/mongo/db/concurrency/deferred_writer.cpp3
-rw-r--r--src/mongo/db/read_concern.cpp2
-rw-r--r--src/mongo/db/repair_database_and_check_version.cpp8
-rw-r--r--src/mongo/db/repl/bgsync.cpp2
-rw-r--r--src/mongo/db/repl/oplog.cpp2
-rw-r--r--src/mongo/db/repl/oplog_buffer_collection.cpp46
-rw-r--r--src/mongo/db/repl/replication_consistency_markers_impl.cpp13
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp8
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_mock.cpp2
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp9
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_elect.cpp6
-rw-r--r--src/mongo/db/repl/replication_recovery.cpp11
-rw-r--r--src/mongo/db/repl/roll_back_local_operations.cpp2
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp6
-rw-r--r--src/mongo/db/repl/sync_tail.cpp20
-rw-r--r--src/mongo/db/repl/topology_coordinator.cpp2
-rw-r--r--src/mongo/db/s/collection_sharding_state.cpp8
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp2
-rw-r--r--src/mongo/db/s/migration_source_manager.cpp15
-rw-r--r--src/mongo/db/session.cpp4
-rw-r--r--src/mongo/db/storage/kv/kv_storage_engine.cpp6
-rw-r--r--src/mongo/db/storage/mobile/mobile_index_test.cpp2
-rw-r--r--src/mongo/db/storage/mobile/mobile_record_store.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp2
-rw-r--r--src/mongo/db/system_index.cpp42
-rw-r--r--src/mongo/db/time_proof_service.cpp6
-rw-r--r--src/mongo/db/views/durable_view_catalog.cpp2
-rw-r--r--src/mongo/executor/network_interface_mock.cpp2
-rw-r--r--src/mongo/s/client/shard_registry.cpp2
-rw-r--r--src/mongo/s/commands/strategy.cpp4
-rw-r--r--src/mongo/s/query/async_results_merger.cpp2
-rw-r--r--src/mongo/s/request_types/migration_secondary_throttle_options.cpp2
-rw-r--r--src/mongo/transport/session_asio.h4
39 files changed, 146 insertions, 153 deletions
diff --git a/src/mongo/db/catalog/catalog_control.cpp b/src/mongo/db/catalog/catalog_control.cpp
index 7a8ccfdb0b1..ea06eb9df67 100644
--- a/src/mongo/db/catalog/catalog_control.cpp
+++ b/src/mongo/db/catalog/catalog_control.cpp
@@ -66,7 +66,7 @@ void openCatalog(OperationContext* opCtx) {
log() << "openCatalog: reconciling catalog and idents";
auto indexesToRebuild = storageEngine->reconcileCatalogAndIdents(opCtx);
- fassertStatusOK(40688, indexesToRebuild.getStatus());
+ fassert(40688, indexesToRebuild.getStatus());
// Determine which indexes need to be rebuilt. rebuildIndexesOnCollection() requires that all
// indexes on that collection are done at once, so we use a map to group them together.
@@ -89,11 +89,11 @@ void openCatalog(OperationContext* opCtx) {
return name == indexName;
});
if (!indexSpecs.isOK() || indexSpecs.getValue().first.empty()) {
- fassertStatusOK(40689,
- {ErrorCodes::InternalError,
- str::stream() << "failed to get index spec for index " << indexName
- << " in collection "
- << collNss.toString()});
+ fassert(40689,
+ {ErrorCodes::InternalError,
+ str::stream() << "failed to get index spec for index " << indexName
+ << " in collection "
+ << collNss.toString()});
}
auto indexesToRebuild = indexSpecs.getValue();
invariant(
@@ -126,9 +126,9 @@ void openCatalog(OperationContext* opCtx) {
log() << "openCatalog: rebuilding index: collection: " << collNss.toString()
<< ", index: " << indexName;
}
- fassertStatusOK(40690,
- rebuildIndexesOnCollection(
- opCtx, dbCatalogEntry, collCatalogEntry, std::move(entry.second)));
+ fassert(40690,
+ rebuildIndexesOnCollection(
+ opCtx, dbCatalogEntry, collCatalogEntry, std::move(entry.second)));
}
// Open all databases and repopulate the UUID catalog.
diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp
index acaf962bcf9..ebbe30aee40 100644
--- a/src/mongo/db/catalog/database_impl.cpp
+++ b/src/mongo/db/catalog/database_impl.cpp
@@ -552,7 +552,7 @@ Status DatabaseImpl::dropCollectionEvenIfSystem(OperationContext* opCtx,
log() << "dropCollection: " << fullns << " (" << uuidString << ") - index namespace '"
<< index->indexNamespace()
<< "' would be too long after drop-pending rename. Dropping index immediately.";
- fassertStatusOK(40463, collection->getIndexCatalog()->dropIndex(opCtx, index));
+ fassert(40463, collection->getIndexCatalog()->dropIndex(opCtx, index));
opObserver->onDropIndex(
opCtx, fullns, collection->uuid(), index->indexName(), index->infoObj());
}
@@ -568,7 +568,7 @@ Status DatabaseImpl::dropCollectionEvenIfSystem(OperationContext* opCtx,
log() << "dropCollection: " << fullns << " (" << uuidString
<< ") - no drop optime available for pending-drop. "
<< "Dropping collection immediately.";
- fassertStatusOK(40462, _finishDropCollection(opCtx, fullns, collection));
+ fassert(40462, _finishDropCollection(opCtx, fullns, collection));
return Status::OK();
}
} else {
@@ -591,7 +591,7 @@ Status DatabaseImpl::dropCollectionEvenIfSystem(OperationContext* opCtx,
log() << "dropCollection: " << fullns << " (" << uuidString
<< ") - renaming to drop-pending collection: " << dpns << " with drop optime "
<< dropOpTime;
- fassertStatusOK(40464, renameCollection(opCtx, fullns.ns(), dpns.ns(), stayTemp));
+ fassert(40464, renameCollection(opCtx, fullns.ns(), dpns.ns(), stayTemp));
// Register this drop-pending namespace with DropPendingCollectionReaper to remove when the
// committed optime reaches the drop optime.
diff --git a/src/mongo/db/catalog/drop_database.cpp b/src/mongo/db/catalog/drop_database.cpp
index d121dbbfdb2..d1e64fe6f8e 100644
--- a/src/mongo/db/catalog/drop_database.cpp
+++ b/src/mongo/db/catalog/drop_database.cpp
@@ -178,7 +178,7 @@ Status dropDatabase(OperationContext* opCtx, const std::string& dbName) {
// A primary processing this will assign a timestamp when the operation is written to
// the oplog. As stated above, a secondary processing must only observe non-replicated
// collections, thus this should not be timestamped.
- fassertStatusOK(40476, db->dropCollectionEvenIfSystem(opCtx, nss));
+ fassert(40476, db->dropCollectionEvenIfSystem(opCtx, nss));
wunit.commit();
}
dropPendingGuard.Dismiss();
diff --git a/src/mongo/db/catalog/index_create_impl.cpp b/src/mongo/db/catalog/index_create_impl.cpp
index a783c41e97e..5f0765fa701 100644
--- a/src/mongo/db/catalog/index_create_impl.cpp
+++ b/src/mongo/db/catalog/index_create_impl.cpp
@@ -187,9 +187,9 @@ MultiIndexBlockImpl::~MultiIndexBlockImpl() {
_indexes[i].block->fail();
}
if (requiresCommitTimestamp) {
- fassertStatusOK(50703,
- _opCtx->recoveryUnit()->setTimestamp(
- LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
+ fassert(50703,
+ _opCtx->recoveryUnit()->setTimestamp(
+ LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
}
wunit.commit();
return;
@@ -318,9 +318,9 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlockImpl::init(const std::vector<BSO
_backgroundOperation.reset(new BackgroundOperation(ns));
if (requiresCommitTimestamp) {
- fassertStatusOK(50702,
- _opCtx->recoveryUnit()->setTimestamp(
- LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
+ fassert(50702,
+ _opCtx->recoveryUnit()->setTimestamp(
+ LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
}
wunit.commit();
@@ -559,9 +559,9 @@ void MultiIndexBlockImpl::commit() {
}
if (requiresCommitTimestamp) {
- fassertStatusOK(50701,
- _opCtx->recoveryUnit()->setTimestamp(
- LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
+ fassert(50701,
+ _opCtx->recoveryUnit()->setTimestamp(
+ LogicalClock::get(_opCtx)->getClusterTime().asTimestamp()));
}
_opCtx->recoveryUnit()->registerChange(new SetNeedToCleanupOnRollback(this));
diff --git a/src/mongo/db/concurrency/deferred_writer.cpp b/src/mongo/db/concurrency/deferred_writer.cpp
index fe2551bb568..29982a22192 100644
--- a/src/mongo/db/concurrency/deferred_writer.cpp
+++ b/src/mongo/db/concurrency/deferred_writer.cpp
@@ -177,8 +177,7 @@ bool DeferredWriter::insertDocument(BSONObj obj) {
// Add the object to the buffer.
_numBytes += obj.objsize();
- fassertStatusOK(40588,
- _pool->schedule([this, obj] { _worker(InsertStatement(obj.getOwned())); }));
+ fassert(40588, _pool->schedule([this, obj] { _worker(InsertStatement(obj.getOwned())); }));
return true;
}
diff --git a/src/mongo/db/read_concern.cpp b/src/mongo/db/read_concern.cpp
index 35a32e26a94..7c054469bd5 100644
--- a/src/mongo/db/read_concern.cpp
+++ b/src/mongo/db/read_concern.cpp
@@ -281,7 +281,7 @@ Status waitForReadConcern(OperationContext* opCtx,
if (atClusterTime) {
- fassertStatusOK(39345, opCtx->recoveryUnit()->selectSnapshot(atClusterTime->asTimestamp()));
+ fassert(39345, opCtx->recoveryUnit()->selectSnapshot(atClusterTime->asTimestamp()));
return Status::OK();
}
diff --git a/src/mongo/db/repair_database_and_check_version.cpp b/src/mongo/db/repair_database_and_check_version.cpp
index 1639499558f..eceed6b3198 100644
--- a/src/mongo/db/repair_database_and_check_version.cpp
+++ b/src/mongo/db/repair_database_and_check_version.cpp
@@ -193,7 +193,7 @@ void checkForIdIndexesAndDropPendingCollections(OperationContext* opCtx, Databas
const NamespaceString ns(collectionName);
if (ns.isDropPendingNamespace()) {
- auto dropOpTime = fassertStatusOK(40459, ns.getDropPendingNamespaceOpTime());
+ auto dropOpTime = fassert(40459, ns.getDropPendingNamespaceOpTime());
log() << "Found drop-pending namespace " << ns << " with drop optime " << dropOpTime;
repl::DropPendingCollectionReaper::get(opCtx)->addDropPendingNamespace(dropOpTime, ns);
}
@@ -315,7 +315,7 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) {
if (!storageGlobalParams.readOnly) {
StatusWith<std::vector<StorageEngine::CollectionIndexNamePair>> swIndexesToRebuild =
storageEngine->reconcileCatalogAndIdents(opCtx);
- fassertStatusOK(40593, swIndexesToRebuild);
+ fassert(40593, swIndexesToRebuild);
if (!swIndexesToRebuild.getValue().empty() && serverGlobalParams.indexBuildRetry) {
log() << "note: restart the server with --noIndexBuildRetry "
@@ -347,8 +347,8 @@ StatusWith<bool> repairDatabasesAndCheckVersion(OperationContext* opCtx) {
invariant(swIndexToRebuild.getValue().first.size() == 1 &&
swIndexToRebuild.getValue().second.size() == 1);
- fassertStatusOK(
- 40592, rebuildIndexesOnCollection(opCtx, dbce, cce, swIndexToRebuild.getValue()));
+ fassert(40592,
+ rebuildIndexesOnCollection(opCtx, dbce, cce, swIndexToRebuild.getValue()));
}
// We open the "local" database before calling checkIfReplMissingFromCommandLine() to
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp
index 2a3248e257c..9be6611d3e0 100644
--- a/src/mongo/db/repl/bgsync.cpp
+++ b/src/mongo/db/repl/bgsync.cpp
@@ -318,7 +318,7 @@ void BackgroundSync::_produce() {
if (ErrorCodes::CallbackCanceled == status || ErrorCodes::isShutdownError(status.code())) {
return;
}
- fassertStatusOK(40349, status);
+ fassert(40349, status);
_syncSourceResolver->join();
{
stdx::lock_guard<stdx::mutex> lock(_mutex);
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index 84fdf55dbe4..bd7e730c7a0 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -1648,7 +1648,7 @@ void initTimestampFromOplog(OperationContext* opCtx, const std::string& oplogNS)
if (!lastOp.isEmpty()) {
LOG(1) << "replSet setting last Timestamp";
- const OpTime opTime = fassertStatusOK(28696, OpTime::parseFromOplogEntry(lastOp));
+ const OpTime opTime = fassert(28696, OpTime::parseFromOplogEntry(lastOp));
setNewTimestamp(opCtx->getServiceContext(), opTime.getTimestamp());
}
}
diff --git a/src/mongo/db/repl/oplog_buffer_collection.cpp b/src/mongo/db/repl/oplog_buffer_collection.cpp
index 2e0ccc8278c..b54ebc26a99 100644
--- a/src/mongo/db/repl/oplog_buffer_collection.cpp
+++ b/src/mongo/db/repl/oplog_buffer_collection.cpp
@@ -110,11 +110,11 @@ void OplogBufferCollection::startup(OperationContext* opCtx) {
// If we are starting from an existing collection, we must populate the in memory state of the
// buffer.
auto sizeResult = _storageInterface->getCollectionSize(opCtx, _nss);
- fassertStatusOK(40403, sizeResult);
+ fassert(40403, sizeResult);
_size = sizeResult.getValue();
auto countResult = _storageInterface->getCollectionCount(opCtx, _nss);
- fassertStatusOK(40404, countResult);
+ fassert(40404, countResult);
_count = countResult.getValue();
// We always start from the beginning, with _lastPoppedKey being empty. This is safe because
@@ -133,12 +133,12 @@ void OplogBufferCollection::startup(OperationContext* opCtx) {
auto lastPushedObj = _lastDocumentPushed_inlock(opCtx);
if (lastPushedObj) {
auto lastPushedId = lastPushedObj->getObjectField(kIdFieldName);
- fassertStatusOK(
+ fassert(
40405,
bsonExtractTimestampField(lastPushedId, kTimestampFieldName, &_lastPushedTimestamp));
long long countAtTimestamp = 0;
- fassertStatusOK(
- 40406, bsonExtractIntegerField(lastPushedId, kSentinelFieldName, &countAtTimestamp));
+ fassert(40406,
+ bsonExtractIntegerField(lastPushedId, kSentinelFieldName, &countAtTimestamp));
_sentinelCount = countAtTimestamp--;
} else {
_lastPushedTimestamp = {};
@@ -188,7 +188,7 @@ void OplogBufferCollection::pushAllNonBlocking(OperationContext* opCtx,
});
auto status = _storageInterface->insertDocuments(opCtx, _nss, docsToInsert);
- fassertStatusOK(40161, status);
+ fassert(40161, status);
_lastPushedTimestamp = ts;
_sentinelCount = sentinelCount;
@@ -276,14 +276,14 @@ boost::optional<OplogBuffer::Value> OplogBufferCollection::_lastDocumentPushed_i
return boost::none;
}
const auto docs =
- fassertStatusOK(40348,
- _storageInterface->findDocuments(opCtx,
- _nss,
- kIdIdxName,
- StorageInterface::ScanDirection::kBackward,
- {},
- BoundInclusion::kIncludeStartKeyOnly,
- 1U));
+ fassert(40348,
+ _storageInterface->findDocuments(opCtx,
+ _nss,
+ kIdIdxName,
+ StorageInterface::ScanDirection::kBackward,
+ {},
+ BoundInclusion::kIncludeStartKeyOnly,
+ 1U));
invariant(1U == docs.size());
return docs.front();
}
@@ -323,15 +323,15 @@ BSONObj OplogBufferCollection::_peek_inlock(OperationContext* opCtx, PeekMode pe
// when size of read ahead cache is greater than zero in the options.
if (_peekCache.empty()) {
std::size_t limit = isPeekCacheEnabled ? _options.peekCacheSize : 1U;
- const auto docs = fassertStatusOK(
- 40163,
- _storageInterface->findDocuments(opCtx,
- _nss,
- kIdIdxName,
- StorageInterface::ScanDirection::kForward,
- startKey,
- boundInclusion,
- limit));
+ const auto docs =
+ fassert(40163,
+ _storageInterface->findDocuments(opCtx,
+ _nss,
+ kIdIdxName,
+ StorageInterface::ScanDirection::kForward,
+ startKey,
+ boundInclusion,
+ limit));
invariant(!docs.empty());
for (const auto& doc : docs) {
_peekCache.push(doc);
diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.cpp b/src/mongo/db/repl/replication_consistency_markers_impl.cpp
index 490fd1234bf..79e47e24589 100644
--- a/src/mongo/db/repl/replication_consistency_markers_impl.cpp
+++ b/src/mongo/db/repl/replication_consistency_markers_impl.cpp
@@ -116,7 +116,7 @@ void ReplicationConsistencyMarkersImpl::initializeMinValidDocument(OperationCont
// the 'minValid' document, but we still want the initialization write to go into the next
// checkpoint since a newly initialized 'minValid' document is always valid.
upsert.timestamp = Timestamp();
- fassertStatusOK(40467, _storageInterface->putSingleton(opCtx, _minValidNss, upsert));
+ fassert(40467, _storageInterface->putSingleton(opCtx, _minValidNss, upsert));
}
bool ReplicationConsistencyMarkersImpl::getInitialSyncFlag(OperationContext* opCtx) const {
@@ -320,10 +320,9 @@ ReplicationConsistencyMarkersImpl::_getOplogTruncateAfterPointDocument(
void ReplicationConsistencyMarkersImpl::_upsertOplogTruncateAfterPointDocument(
OperationContext* opCtx, const BSONObj& updateSpec) {
- fassertStatusOK(
- 40512,
- _storageInterface->upsertById(
- opCtx, _oplogTruncateAfterPointNss, kOplogTruncateAfterPointId["_id"], updateSpec));
+ fassert(40512,
+ _storageInterface->upsertById(
+ opCtx, _oplogTruncateAfterPointNss, kOplogTruncateAfterPointId["_id"], updateSpec));
}
void ReplicationConsistencyMarkersImpl::setOplogTruncateAfterPoint(OperationContext* opCtx,
@@ -376,13 +375,13 @@ void ReplicationConsistencyMarkersImpl::_upsertCheckpointTimestampDocument(
if (status == ErrorCodes::NamespaceNotFound) {
status = _storageInterface->createCollection(
opCtx, _checkpointTimestampNss, CollectionOptions());
- fassertStatusOK(40581, status);
+ fassert(40581, status);
status = _storageInterface->upsertById(
opCtx, _checkpointTimestampNss, kCheckpointTimestampId["_id"], updateSpec);
}
- fassertStatusOK(40582, status);
+ fassert(40582, status);
}
void ReplicationConsistencyMarkersImpl::writeCheckpointTimestamp(OperationContext* opCtx,
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index 81e4f554b22..c5ae515cd07 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -194,7 +194,7 @@ void scheduleWork(executor::TaskExecutor* executor,
if (cbh == ErrorCodes::ShutdownInProgress) {
return;
}
- fassertStatusOK(40460, cbh);
+ fassert(40460, cbh);
}
} // namespace
@@ -459,7 +459,7 @@ OpTime ReplicationCoordinatorExternalStateImpl::onTransitionToPrimary(OperationC
wuow.commit();
});
}
- const auto opTimeToReturn = fassertStatusOK(28665, loadLastOpTime(opCtx));
+ const auto opTimeToReturn = fassert(28665, loadLastOpTime(opCtx));
_shardingOnTransitionToPrimaryHook(opCtx);
_dropAllTempCollections(opCtx);
@@ -685,7 +685,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook
return;
}
- fassertStatusOK(40107, status);
+ fassert(40107, status);
if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) {
status = ShardingCatalogManager::get(opCtx)->initializeConfigDatabaseIfNeeded(opCtx);
@@ -717,7 +717,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook
return;
}
- fassertStatusOK(40217, status);
+ fassert(40217, status);
}
// Free any leftover locks from previous instantiations.
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp b/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp
index bf908281c33..a5ec47110c4 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp
@@ -282,7 +282,7 @@ OpTime ReplicationCoordinatorExternalStateMock::onTransitionToPrimary(OperationC
bool isV1ElectionProtocol) {
_lastOpTime = _firstOpTimeOfMyTerm;
_firstOpTimeOfMyTerm = OpTime();
- return fassertStatusOK(40297, _lastOpTime);
+ return fassert(40297, _lastOpTime);
}
void ReplicationCoordinatorExternalStateMock::startNoopWriter(OpTime opTime) {}
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 66e612f5bac..a794d12932e 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -451,8 +451,7 @@ void ReplicationCoordinatorImpl::appendConnectionStats(executor::ConnectionPoolS
bool ReplicationCoordinatorImpl::_startLoadLocalConfig(OperationContext* opCtx) {
// Create necessary replication collections to guarantee that if a checkpoint sees data after
// initial sync has completed, it also sees these collections.
- fassertStatusOK(50708,
- _replicationProcess->getConsistencyMarkers()->createInternalCollections(opCtx));
+ fassert(50708, _replicationProcess->getConsistencyMarkers()->createInternalCollections(opCtx));
_replicationProcess->getConsistencyMarkers()->initializeMinValidDocument(opCtx);
@@ -476,7 +475,7 @@ bool ReplicationCoordinatorImpl::_startLoadLocalConfig(OperationContext* opCtx)
if (status == ErrorCodes::NamespaceNotFound) {
log() << "Did not find local Rollback ID document at startup. Creating one.";
auto initializingStatus = _replicationProcess->initializeRollbackID(opCtx);
- fassertStatusOK(40424, initializingStatus);
+ fassert(40424, initializingStatus);
} else {
severe() << "Error loading local Rollback ID document at startup; " << status;
fassertFailedNoTrace(40428);
@@ -513,7 +512,7 @@ bool ReplicationCoordinatorImpl::_startLoadLocalConfig(OperationContext* opCtx)
if (handle == ErrorCodes::ShutdownInProgress) {
handle = CallbackHandle{};
}
- fassertStatusOK(40446, handle);
+ fassert(40446, handle);
stdx::lock_guard<stdx::mutex> lk(_mutex);
_finishLoadLocalConfigCbh = std::move(handle.getValue());
@@ -3489,7 +3488,7 @@ CallbackHandle ReplicationCoordinatorImpl::_scheduleWorkAt(Date_t when, const Ca
if (cbh == ErrorCodes::ShutdownInProgress) {
return {};
}
- return fassertStatusOK(28800, cbh);
+ return fassert(28800, cbh);
}
EventHandle ReplicationCoordinatorImpl::_makeEvent() {
diff --git a/src/mongo/db/repl/replication_coordinator_impl_elect.cpp b/src/mongo/db/repl/replication_coordinator_impl_elect.cpp
index b50252225a0..9fe983e859a 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_elect.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_elect.cpp
@@ -285,9 +285,9 @@ void ReplicationCoordinatorImpl::_recoverFromElectionTie(
if (!status.isOK()) {
LOG(2) << "ReplicationCoordinatorImpl::_recoverFromElectionTie -- " << status.reason();
} else {
- fassertStatusOK(28817,
- _topCoord->becomeCandidateIfElectable(
- now, TopologyCoordinator::StartElectionReason::kElectionTimeout));
+ fassert(28817,
+ _topCoord->becomeCandidateIfElectable(
+ now, TopologyCoordinator::StartElectionReason::kElectionTimeout));
_startElectSelf_inlock();
}
}
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp
index d01ac004a69..1c2cef4dadd 100644
--- a/src/mongo/db/repl/replication_recovery.cpp
+++ b/src/mongo/db/repl/replication_recovery.cpp
@@ -114,7 +114,7 @@ void ReplicationRecoveryImpl::recoverFromOplog(OperationContext* opCtx) try {
boost::optional<OpTime> topOfOplog = boost::none;
if (topOfOplogSW.getStatus() != ErrorCodes::CollectionIsEmpty &&
topOfOplogSW.getStatus() != ErrorCodes::NamespaceNotFound) {
- fassertStatusOK(40290, topOfOplogSW);
+ fassert(40290, topOfOplogSW);
topOfOplog = topOfOplogSW.getValue();
}
@@ -199,7 +199,7 @@ void ReplicationRecoveryImpl::_applyToEndOfOplog(OperationContext* opCtx,
}
auto firstTimestampFound =
- fassertStatusOK(40291, OpTime::parseFromOplogEntry(cursor->nextSafe())).getTimestamp();
+ fassert(40291, OpTime::parseFromOplogEntry(cursor->nextSafe())).getTimestamp();
if (firstTimestampFound != oplogApplicationStartPoint) {
severe() << "Oplog entry at " << oplogApplicationStartPoint.toBSON()
<< " is missing; actual entry found is " << firstTimestampFound.toBSON();
@@ -211,10 +211,9 @@ void ReplicationRecoveryImpl::_applyToEndOfOplog(OperationContext* opCtx,
while (cursor->more()) {
auto entry = cursor->nextSafe();
- fassertStatusOK(40294,
- SyncTail::syncApply(opCtx, entry, OplogApplication::Mode::kRecovering));
- _consistencyMarkers->setAppliedThrough(
- opCtx, fassertStatusOK(40295, OpTime::parseFromOplogEntry(entry)));
+ fassert(40294, SyncTail::syncApply(opCtx, entry, OplogApplication::Mode::kRecovering));
+ _consistencyMarkers->setAppliedThrough(opCtx,
+ fassert(40295, OpTime::parseFromOplogEntry(entry)));
}
}
diff --git a/src/mongo/db/repl/roll_back_local_operations.cpp b/src/mongo/db/repl/roll_back_local_operations.cpp
index e9d4084a046..4734f610075 100644
--- a/src/mongo/db/repl/roll_back_local_operations.cpp
+++ b/src/mongo/db/repl/roll_back_local_operations.cpp
@@ -53,7 +53,7 @@ MONGO_FP_DECLARE(rollbackHangThenFailAfterWritingMinValid);
namespace {
OpTime getOpTime(const OplogInterface::Iterator::Value& oplogValue) {
- return fassertStatusOK(40298, OpTime::parseFromOplogEntry(oplogValue.first));
+ return fassert(40298, OpTime::parseFromOplogEntry(oplogValue.first));
}
Timestamp getTimestamp(const BSONObj& operation) {
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index 88ce5464b24..4d4be47675f 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -608,7 +608,7 @@ void checkRbidAndUpdateMinValid(OperationContext* opCtx,
// online until we get to that point in freshness. In other words, we do not transition from
// RECOVERING state to SECONDARY state until we have reached the minValid oplog entry.
- OpTime minValid = fassertStatusOK(40492, OpTime::parseFromOplogEntry(newMinValidDoc));
+ OpTime minValid = fassert(40492, OpTime::parseFromOplogEntry(newMinValidDoc));
log() << "Setting minvalid to " << minValid;
// This method is only used with storage engines that do not support recover to stable
@@ -790,7 +790,7 @@ void dropCollection(OperationContext* opCtx,
// We permanently drop the collection rather than 2-phase drop the collection
// here. By not passing in an opTime to dropCollectionEvenIfSystem() the collection
// is immediately dropped.
- fassertStatusOK(40504, db->dropCollectionEvenIfSystem(opCtx, nss));
+ fassert(40504, db->dropCollectionEvenIfSystem(opCtx, nss));
wunit.commit();
}
@@ -945,7 +945,7 @@ Status _syncRollback(OperationContext* opCtx,
try {
ON_BLOCK_EXIT([&] {
auto status = replicationProcess->incrementRollbackID(opCtx);
- fassertStatusOK(40497, status);
+ fassert(40497, status);
});
syncFixUp(opCtx, how, rollbackSource, replCoord, replicationProcess);
} catch (const RSFatalException& e) {
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index 6a2129345a5..1a5c155d89d 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -497,10 +497,9 @@ void scheduleWritesToOplog(OperationContext* opCtx,
ops[i].raw, ops[i].getOpTime().getTimestamp(), ops[i].getOpTime().getTerm()});
}
- fassertStatusOK(
- 40141,
- StorageInterface::get(opCtx.get())
- ->insertDocuments(opCtx.get(), NamespaceString::kRsOplogNamespace, docs));
+ fassert(40141,
+ StorageInterface::get(opCtx.get())
+ ->insertDocuments(opCtx.get(), NamespaceString::kRsOplogNamespace, docs));
};
};
@@ -737,8 +736,8 @@ OpTime SyncTail::multiApply(OperationContext* opCtx, MultiApplier::Operations op
return Status::OK();
};
- return fassertStatusOK(
- 34437, repl::multiApply(opCtx, _writerPool.get(), std::move(ops), applyOperation));
+ return fassert(34437,
+ repl::multiApply(opCtx, _writerPool.get(), std::move(ops), applyOperation));
}
namespace {
@@ -826,7 +825,7 @@ private:
auto storageInterface = StorageInterface::get(opCtx.get());
auto oplogMaxSizeResult =
storageInterface->getOplogMaxSize(opCtx.get(), NamespaceString::kRsOplogNamespace);
- auto oplogMaxSize = fassertStatusOK(40301, oplogMaxSizeResult);
+ auto oplogMaxSize = fassert(40301, oplogMaxSizeResult);
return std::min(oplogMaxSize / 10, std::size_t(replBatchLimitBytes));
}
@@ -1492,10 +1491,9 @@ StatusWith<OpTime> multiApply(OperationContext* opCtx,
// safe to set an index as multikey too early, just not too late. We conservatively pick
// the first timestamp in the batch since we do not have enough information to find out
// the timestamp of the first write that set the given multikey path.
- fassertStatusOK(
- 50686,
- StorageInterface::get(opCtx)->setIndexIsMultikey(
- opCtx, info.nss, info.indexName, info.multikeyPaths, firstTimeInBatch));
+ fassert(50686,
+ StorageInterface::get(opCtx)->setIndexIsMultikey(
+ opCtx, info.nss, info.indexName, info.multikeyPaths, firstTimeInBatch));
}
}
diff --git a/src/mongo/db/repl/topology_coordinator.cpp b/src/mongo/db/repl/topology_coordinator.cpp
index 749d007d7eb..a8eba4a89d2 100644
--- a/src/mongo/db/repl/topology_coordinator.cpp
+++ b/src/mongo/db/repl/topology_coordinator.cpp
@@ -1685,7 +1685,7 @@ HeartbeatResponseAction TopologyCoordinator::_updatePrimaryFromHBData(
LOG(2) << "TopologyCoordinator::_updatePrimaryFromHBData - " << status.reason();
return HeartbeatResponseAction::makeNoAction();
}
- fassertStatusOK(28816, becomeCandidateIfElectable(now, StartElectionReason::kElectionTimeout));
+ fassert(28816, becomeCandidateIfElectable(now, StartElectionReason::kElectionTimeout));
return HeartbeatResponseAction::makeElectAction();
}
diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp
index 6909fc6e4c6..3c8d4d6e8d6 100644
--- a/src/mongo/db/s/collection_sharding_state.cpp
+++ b/src/mongo/db/s/collection_sharding_state.cpp
@@ -542,8 +542,8 @@ void CollectionShardingState::_onConfigCollectionsUpdateOp(OperationContext* opC
// Extract which user collection was updated.
std::string updatedCollection;
- fassertStatusOK(
- 40477, bsonExtractStringField(query, ShardCollectionType::ns.name(), &updatedCollection));
+ fassert(40477,
+ bsonExtractStringField(query, ShardCollectionType::ns.name(), &updatedCollection));
// Parse the '$set' update.
BSONElement setElement;
@@ -581,8 +581,8 @@ void CollectionShardingState::_onConfigDeleteInvalidateCachedMetadataAndNotify(
// Extract which collection entry is being deleted from the _id field.
std::string deletedCollection;
- fassertStatusOK(
- 40479, bsonExtractStringField(query, ShardCollectionType::ns.name(), &deletedCollection));
+ fassert(40479,
+ bsonExtractStringField(query, ShardCollectionType::ns.name(), &deletedCollection));
const NamespaceString deletedNss(deletedCollection);
// Need the WUOW to retain the lock for CollectionVersionLogOpHandler::commit().
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
index 7738a0a3fc2..e990e35f7dd 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp
@@ -431,7 +431,7 @@ Status ShardingCatalogManager::dropCollection(OperationContext* opCtx, const Nam
SetShardVersionRequest ssv = SetShardVersionRequest::makeForVersioningNoPersist(
shardRegistry->getConfigServerConnectionString(),
shardEntry.getName(),
- fassertStatusOK(28781, ConnectionString::parse(shardEntry.getHost())),
+ fassert(28781, ConnectionString::parse(shardEntry.getHost())),
nss,
ChunkVersion::DROPPED(),
true);
diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp
index d31aa650556..33e61c9ad14 100644
--- a/src/mongo/db/s/migration_source_manager.cpp
+++ b/src/mongo/db/s/migration_source_manager.cpp
@@ -498,14 +498,13 @@ Status MigrationSourceManager::commitChunkMetadataOnConfig(OperationContext* opC
}
}
- fassertStatusOK(
- 40137,
- status.withContext(
- str::stream() << "Failed to commit migration for chunk " << _args.toString()
- << " due to "
- << redact(migrationCommitStatus)
- << ". Updating the optime with a write before refreshing the "
- << "metadata also failed"));
+ fassert(40137,
+ status.withContext(
+ str::stream() << "Failed to commit migration for chunk " << _args.toString()
+ << " due to "
+ << redact(migrationCommitStatus)
+ << ". Updating the optime with a write before refreshing the "
+ << "metadata also failed"));
}
// Do a best effort attempt to incrementally refresh the metadata before leaving the critical
diff --git a/src/mongo/db/session.cpp b/src/mongo/db/session.cpp
index cabe1d79b59..62f2fcfb611 100644
--- a/src/mongo/db/session.cpp
+++ b/src/mongo/db/session.cpp
@@ -183,8 +183,8 @@ void updateSessionEntry(OperationContext* opCtx, const UpdateRequest& updateRequ
invariant(collection->getDefaultCollator() == nullptr);
boost::intrusive_ptr<ExpressionContext> expCtx(new ExpressionContext(opCtx, nullptr));
- auto matcher = fassertStatusOK(
- 40673, MatchExpressionParser::parse(updateRequest.getQuery(), std::move(expCtx)));
+ auto matcher =
+ fassert(40673, MatchExpressionParser::parse(updateRequest.getQuery(), std::move(expCtx)));
if (!matcher->matchesBSON(originalDoc)) {
// Document no longer match what we expect so throw WCE to make the caller re-examine.
throw WriteConflictException();
diff --git a/src/mongo/db/storage/kv/kv_storage_engine.cpp b/src/mongo/db/storage/kv/kv_storage_engine.cpp
index d70d06f4d82..b7a64f30d94 100644
--- a/src/mongo/db/storage/kv/kv_storage_engine.cpp
+++ b/src/mongo/db/storage/kv/kv_storage_engine.cpp
@@ -145,7 +145,7 @@ void KVStorageEngine::loadCatalog(OperationContext* opCtx) {
<< " unknown to storage engine after unclean shutdown";
WriteUnitOfWork wuow(opCtx);
- fassertStatusOK(50716, _catalog->dropCollection(opCtx, coll));
+ fassert(50716, _catalog->dropCollection(opCtx, coll));
wuow.commit();
continue;
}
@@ -236,7 +236,7 @@ KVStorageEngine::reconcileCatalogAndIdents(OperationContext* opCtx) {
const auto& toRemove = it;
log() << "Dropping unknown ident: " << toRemove;
WriteUnitOfWork wuow(opCtx);
- fassertStatusOK(40591, _engine->dropIdent(opCtx, toRemove));
+ fassert(40591, _engine->dropIdent(opCtx, toRemove));
wuow.commit();
}
@@ -305,7 +305,7 @@ KVStorageEngine::reconcileCatalogAndIdents(OperationContext* opCtx) {
log() << "Dropping unfinished index. Collection: " << coll
<< " Index: " << indexName;
// Ensure the `ident` is dropped while we have the `indexIdent` value.
- fassertStatusOK(50713, _engine->dropIdent(opCtx, indexIdent));
+ fassert(50713, _engine->dropIdent(opCtx, indexIdent));
indexesToDrop.push_back(indexName);
continue;
}
diff --git a/src/mongo/db/storage/mobile/mobile_index_test.cpp b/src/mongo/db/storage/mobile/mobile_index_test.cpp
index a9c2e6fbd78..31419df65fb 100644
--- a/src/mongo/db/storage/mobile/mobile_index_test.cpp
+++ b/src/mongo/db/storage/mobile/mobile_index_test.cpp
@@ -57,7 +57,7 @@ public:
std::string ident("index_" + std::to_string(inc++));
OperationContextNoop opCtx(newRecoveryUnit().release());
Status status = MobileIndex::create(&opCtx, ident);
- fassertStatusOK(37052, status);
+ fassert(37052, status);
if (isUnique) {
return stdx::make_unique<MobileIndexUnique>(_ordering, ident);
diff --git a/src/mongo/db/storage/mobile/mobile_record_store.cpp b/src/mongo/db/storage/mobile/mobile_record_store.cpp
index 01c8422ce3f..b89ca31e6b6 100644
--- a/src/mongo/db/storage/mobile/mobile_record_store.cpp
+++ b/src/mongo/db/storage/mobile/mobile_record_store.cpp
@@ -466,7 +466,7 @@ Status MobileRecordStore::updateRecord(OperationContext* opCtx,
_changeDataSize(opCtx, -dataSizeBefore + len);
if (notifier) {
- fassertStatusOK(37054, notifier->recordStoreGoingToUpdateInPlace(opCtx, recId));
+ fassert(37054, notifier->recordStoreGoingToUpdateInPlace(opCtx, recId));
}
std::string updateQuery = "UPDATE \"" + _ident + "\" SET data = ? " + "WHERE rec_id = ?;";
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp
index 13e2bc7c32a..53c7e6918f4 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp
@@ -264,7 +264,7 @@ uint64_t WiredTigerOplogManager::_fetchAllCommittedValue(WT_CONNECTION* conn) {
}
uint64_t tmp;
- fassertStatusOK(38002, parseNumberFromStringWithBase(buf, 16, &tmp));
+ fassert(38002, parseNumberFromStringWithBase(buf, 16, &tmp));
return tmp;
}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
index 48b1b9b6717..c7278a60de5 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp
@@ -78,7 +78,7 @@ MONGO_STATIC_ASSERT(kCurrentRecordStoreVersion <= kMaximumRecordStoreVersion);
void checkOplogFormatVersion(OperationContext* opCtx, const std::string& uri) {
StatusWith<BSONObj> appMetadata = WiredTigerUtil::getApplicationMetadata(opCtx, uri);
- fassertStatusOK(39999, appMetadata);
+ fassert(39999, appMetadata);
fassertNoTrace(39998, appMetadata.getValue().getIntField("oplogKeyExtractionVersion") == 1);
}
@@ -1152,7 +1152,7 @@ Status WiredTigerRecordStore::_insertRecords(OperationContext* opCtx,
}
if (!ts.isNull()) {
LOG(4) << "inserting record with timestamp " << ts;
- fassertStatusOK(39001, opCtx->recoveryUnit()->setTimestamp(ts));
+ fassert(39001, opCtx->recoveryUnit()->setTimestamp(ts));
}
setKey(c, record.id);
WiredTigerItem value(record.data.data(), record.data.size());
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp
index 9121b7ad984..fc921527b79 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp
@@ -94,7 +94,7 @@ Timestamp WiredTigerSnapshotManager::beginTransactionOnCommittedSnapshot(
}
auto status = setTransactionReadTimestamp(_committedSnapshot.get(), session);
- fassertStatusOK(30635, status);
+ fassert(30635, status);
return *_committedSnapshot;
}
diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp
index 594cf4c4162..f1e2992ec70 100644
--- a/src/mongo/db/system_index.cpp
+++ b/src/mongo/db/system_index.cpp
@@ -108,7 +108,7 @@ void generateSystemIndexForExistingCollection(OperationContext* opCtx,
try {
auto indexSpecStatus = index_key_validate::validateIndexSpec(
opCtx, spec.toBSON(), ns, serverGlobalParams.featureCompatibility);
- BSONObj indexSpec = fassertStatusOK(40452, indexSpecStatus);
+ BSONObj indexSpec = fassert(40452, indexSpecStatus);
log() << "No authorization index detected on " << ns
<< " collection. Attempting to recover by creating an index with spec: " << indexSpec;
@@ -116,10 +116,10 @@ void generateSystemIndexForExistingCollection(OperationContext* opCtx,
MultiIndexBlock indexer(opCtx, collection);
writeConflictRetry(opCtx, "authorization index regeneration", ns.ns(), [&] {
- fassertStatusOK(40453, indexer.init(indexSpec));
+ fassert(40453, indexer.init(indexSpec));
});
- fassertStatusOK(40454, indexer.insertAllDocumentsInCollection());
+ fassert(40454, indexer.insertAllDocumentsInCollection());
writeConflictRetry(opCtx, "authorization index regeneration", ns.ns(), [&] {
WriteUnitOfWork wunit(opCtx);
@@ -204,25 +204,25 @@ void createSystemIndexes(OperationContext* opCtx, Collection* collection) {
invariant(collection);
const NamespaceString& ns = collection->ns();
if (ns == AuthorizationManager::usersCollectionNamespace) {
- auto indexSpec = fassertStatusOK(
- 40455,
- index_key_validate::validateIndexSpec(opCtx,
- v3SystemUsersIndexSpec.toBSON(),
- ns,
- serverGlobalParams.featureCompatibility));
-
- fassertStatusOK(
- 40456, collection->getIndexCatalog()->createIndexOnEmptyCollection(opCtx, indexSpec));
+ auto indexSpec =
+ fassert(40455,
+ index_key_validate::validateIndexSpec(opCtx,
+ v3SystemUsersIndexSpec.toBSON(),
+ ns,
+ serverGlobalParams.featureCompatibility));
+
+ fassert(40456,
+ collection->getIndexCatalog()->createIndexOnEmptyCollection(opCtx, indexSpec));
} else if (ns == AuthorizationManager::rolesCollectionNamespace) {
- auto indexSpec = fassertStatusOK(
- 40457,
- index_key_validate::validateIndexSpec(opCtx,
- v3SystemRolesIndexSpec.toBSON(),
- ns,
- serverGlobalParams.featureCompatibility));
-
- fassertStatusOK(
- 40458, collection->getIndexCatalog()->createIndexOnEmptyCollection(opCtx, indexSpec));
+ auto indexSpec =
+ fassert(40457,
+ index_key_validate::validateIndexSpec(opCtx,
+ v3SystemRolesIndexSpec.toBSON(),
+ ns,
+ serverGlobalParams.featureCompatibility));
+
+ fassert(40458,
+ collection->getIndexCatalog()->createIndexOnEmptyCollection(opCtx, indexSpec));
}
}
diff --git a/src/mongo/db/time_proof_service.cpp b/src/mongo/db/time_proof_service.cpp
index fc208d342e9..2b853224484 100644
--- a/src/mongo/db/time_proof_service.cpp
+++ b/src/mongo/db/time_proof_service.cpp
@@ -50,9 +50,9 @@ TimeProofService::Key TimeProofService::generateRandomKey() {
std::unique_ptr<SecureRandom> rng(SecureRandom::create());
std::generate(keyBuffer.begin(), keyBuffer.end(), [&] { return rng->nextInt64(); });
- return fassertStatusOK(40384,
- SHA1Block::fromBuffer(reinterpret_cast<std::uint8_t*>(keyBuffer.data()),
- SHA1Block::kHashLength));
+ return fassert(40384,
+ SHA1Block::fromBuffer(reinterpret_cast<std::uint8_t*>(keyBuffer.data()),
+ SHA1Block::kHashLength));
}
TimeProofService::TimeProof TimeProofService::getProof(LogicalTime time, const Key& key) {
diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp
index 90ac1f4f95b..270bd1ce9c0 100644
--- a/src/mongo/db/views/durable_view_catalog.cpp
+++ b/src/mongo/db/views/durable_view_catalog.cpp
@@ -82,7 +82,7 @@ Status DurableViewCatalogImpl::iterate(OperationContext* opCtx, Callback callbac
// Check the document is valid BSON, with only the expected fields.
// Use the latest BSON validation version. Existing view definitions are allowed to contain
// decimal data even if decimal is disabled.
- fassertStatusOK(40224, validateBSON(data.data(), data.size(), BSONVersion::kLatest));
+ fassert(40224, validateBSON(data.data(), data.size(), BSONVersion::kLatest));
BSONObj viewDef = data.toBson();
// Check read definitions for correct structure, and refuse reading past invalid
diff --git a/src/mongo/executor/network_interface_mock.cpp b/src/mongo/executor/network_interface_mock.cpp
index db6bee221f7..39e8e4e2995 100644
--- a/src/mongo/executor/network_interface_mock.cpp
+++ b/src/mongo/executor/network_interface_mock.cpp
@@ -51,7 +51,7 @@ using ResponseStatus = TaskExecutor::ResponseStatus;
NetworkInterfaceMock::NetworkInterfaceMock()
: _waitingToRunMask(0),
_currentlyRunning(kNoThread),
- _now(fassertStatusOK(18653, dateFromISOString("2014-08-01T00:00:00Z"))),
+ _now(fassert(18653, dateFromISOString("2014-08-01T00:00:00Z"))),
_hasStarted(false),
_inShutdown(false),
_executorNextWakeupDate(Date_t::max()) {}
diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp
index 3dfbb716bac..c97279a8403 100644
--- a/src/mongo/s/client/shard_registry.cpp
+++ b/src/mongo/s/client/shard_registry.cpp
@@ -329,7 +329,7 @@ bool ShardRegistry::reload(OperationContext* opCtx) {
void ShardRegistry::replicaSetChangeShardRegistryUpdateHook(
const std::string& setName, const std::string& newConnectionString) {
// Inform the ShardRegsitry of the new connection string for the shard.
- auto connString = fassertStatusOK(28805, ConnectionString::parse(newConnectionString));
+ auto connString = fassert(28805, ConnectionString::parse(newConnectionString));
invariant(setName == connString.getSetName());
grid.shardRegistry()->updateReplSetHosts(connString);
}
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp
index 2798fe29e85..e16e35bf978 100644
--- a/src/mongo/s/commands/strategy.cpp
+++ b/src/mongo/s/commands/strategy.cpp
@@ -492,8 +492,8 @@ void Strategy::commandOp(OperationContext* opCtx,
CommandResult result;
result.shardTargetId = shardId;
- result.target = fassertStatusOK(
- 34417, ConnectionString::parse(cursor.getShardCursor(shardId)->originalHost()));
+ result.target =
+ fassert(34417, ConnectionString::parse(cursor.getShardCursor(shardId)->originalHost()));
result.result = cursor.getShardCursor(shardId)->peekFirst().getOwned();
results->push_back(result);
}
diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp
index e315452160f..4e9488e839b 100644
--- a/src/mongo/s/query/async_results_merger.cpp
+++ b/src/mongo/s/query/async_results_merger.cpp
@@ -677,7 +677,7 @@ executor::TaskExecutor::EventHandle AsyncResultsMerger::kill(OperationContext* o
}
return executor::TaskExecutor::EventHandle();
}
- fassertStatusOK(28716, statusWithEvent);
+ fassert(28716, statusWithEvent);
_killCompleteEvent = statusWithEvent.getValue();
_scheduleKillCursors(lk, opCtx);
diff --git a/src/mongo/s/request_types/migration_secondary_throttle_options.cpp b/src/mongo/s/request_types/migration_secondary_throttle_options.cpp
index a0b2a8d92cf..0b5a2088335 100644
--- a/src/mongo/s/request_types/migration_secondary_throttle_options.cpp
+++ b/src/mongo/s/request_types/migration_secondary_throttle_options.cpp
@@ -149,7 +149,7 @@ WriteConcernOptions MigrationSecondaryThrottleOptions::getWriteConcern() const {
invariant(_writeConcernBSON);
WriteConcernOptions writeConcern;
- fassertStatusOK(34414, writeConcern.parse(*_writeConcernBSON));
+ fassert(34414, writeConcern.parse(*_writeConcernBSON));
return writeConcern;
}
diff --git a/src/mongo/transport/session_asio.h b/src/mongo/transport/session_asio.h
index a1100eed535..8a185830dd3 100644
--- a/src/mongo/transport/session_asio.h
+++ b/src/mongo/transport/session_asio.h
@@ -245,7 +245,7 @@ protected:
asio::error_code ec;
if (_blockingMode != Sync) {
getSocket().non_blocking(false, ec);
- fassertStatusOK(40490, errorCodeToStatus(ec));
+ fassert(40490, errorCodeToStatus(ec));
_blockingMode = Sync;
}
@@ -273,7 +273,7 @@ protected:
asio::error_code ec;
getSocket().non_blocking(true, ec);
- fassertStatusOK(50706, errorCodeToStatus(ec));
+ fassert(50706, errorCodeToStatus(ec));
_blockingMode = Async;
}