Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–48 unchanged (48 lines)
49#include "mongo/db/dbhelpers.h"
50#include "mongo/db/import_collection_oplog_entry_gen.h"
51#include "mongo/db/index/index_constants.h"
52#include "mongo/db/index_builds/index_build_oplog_entry.h"
53#include "mongo/db/index_builds/index_builds_coordinator.h"
54#include "mongo/db/index_builds/index_builds_manager.h"
55#include "mongo/db/namespace_string.h"
56#include "mongo/db/op_observer/op_observer.h"
57#include "mongo/db/op_observer/op_observer_util.h"
58#include "mongo/db/pipeline/change_stream_preimage_gen.h"
59#include "mongo/db/profile_settings.h"
60#include "mongo/db/query/find_command.h"
61#include "mongo/db/query/write_ops/delete.h"
…lines 62–1060 unchanged (999 lines)
1061 storageEngine->generateNewIndexIdent(entry.getNss().dbName());
1062 }
1063 if (shouldGenerateInternalIdents) {
1064 indexBuildInfo.setInternalIdents(*storageEngine);
1065 }
1066 }
1067
1068 IndexBuildsCoordinator::ApplicationMode applicationMode =
1069 IndexBuildsCoordinator::ApplicationMode::kNormal;
1070 if (mode == OplogApplication::Mode::kInitialSync) {
1071 applicationMode = IndexBuildsCoordinator::ApplicationMode::kInitialSync;
1072 }
1073 IndexBuildsCoordinator::get(opCtx)->applyStartIndexBuild(
…lines 1074–1092 unchanged (19 lines)
1093 const auto& entry = *op;
1094 auto swOplogEntry = IndexBuildOplogEntry::parse(opCtx, entry);
1095 if (!swOplogEntry.isOK()) {
1096 return swOplogEntry.getStatus().withContext(
1097 "Error parsing 'commitIndexBuild' oplog entry");
1098 }
1099 auto* indexBuildsCoordinator = IndexBuildsCoordinator::get(opCtx);
1100 indexBuildsCoordinator->applyCommitIndexBuild(opCtx, swOplogEntry.getValue());
1101 return Status::OK();
1102 },
1103 {ErrorCodes::IndexAlreadyExists,
1104 ErrorCodes::IndexBuildAlreadyInProgress,
1105 ErrorCodes::NamespaceNotFound,
1106 ErrorCodes::NoSuchKey}}},
…lines 1107–1113 unchanged (7 lines)
1114
1115 auto swOplogEntry = IndexBuildOplogEntry::parse(opCtx, *op);
1116 if (!swOplogEntry.isOK()) {
1117 return swOplogEntry.getStatus().withContext(
1118 "Error parsing 'abortIndexBuild' oplog entry");
1119 }
1120 IndexBuildsCoordinator::get(opCtx)->applyAbortIndexBuild(opCtx, swOplogEntry.getValue());
1121 return Status::OK();
1122 },
1123 {ErrorCodes::NamespaceNotFound}}},
1124 {"collMod",
1125 {[](OperationContext* opCtx, const ApplierOperation& op, OplogApplication::Mode mode)
1126 -> Status {
…lines 1127–3190 unchanged (2064 lines)

After

…lines 1–48 unchanged (48 lines)
49#include "mongo/db/dbhelpers.h"
50#include "mongo/db/import_collection_oplog_entry_gen.h"
51#include "mongo/db/index/index_constants.h"
52#include "mongo/db/index_builds/index_build_oplog_entry.h"
53#include "mongo/db/index_builds/index_builds_coordinator.h"
54#include "mongo/db/index_builds/index_builds_manager.h"
55#include "mongo/db/index_builds/primary_driven/util.h"
56#include "mongo/db/namespace_string.h"
57#include "mongo/db/op_observer/op_observer.h"
58#include "mongo/db/op_observer/op_observer_util.h"
59#include "mongo/db/pipeline/change_stream_preimage_gen.h"
60#include "mongo/db/profile_settings.h"
61#include "mongo/db/query/find_command.h"
…lines 62–1062 unchanged (1001 lines)
1063 }
1064 if (shouldGenerateInternalIdents) {
1065 indexBuildInfo.setInternalIdents(*storageEngine);
1066 }
1067 }
1068
1069 if (mongo::feature_flags::gFeatureFlagPrimaryDrivenIndexBuilds
1070 .isEnabledUseLastLTSFCVWhenUninitialized(
1071 VersionContext::getDecoration(opCtx),
1072 serverGlobalParams.featureCompatibility.acquireFCVSnapshot())) {
1073 return index_builds::primary_driven::start(opCtx,
1074 entry.getNss().dbName(),
1075 oplogEntry.collUUID,
1076 oplogEntry.buildUUID,
1077 oplogEntry.indexes);
1078 }
1079
1080 IndexBuildsCoordinator::ApplicationMode applicationMode =
1081 IndexBuildsCoordinator::ApplicationMode::kNormal;
1082 if (mode == OplogApplication::Mode::kInitialSync) {
1083 applicationMode = IndexBuildsCoordinator::ApplicationMode::kInitialSync;
1084 }
…lines 1085–1104 unchanged (20 lines)
1105 const auto& entry = *op;
1106 auto swOplogEntry = IndexBuildOplogEntry::parse(opCtx, entry);
1107 if (!swOplogEntry.isOK()) {
1108 return swOplogEntry.getStatus().withContext(
1109 "Error parsing 'commitIndexBuild' oplog entry");
1110 }
1111 auto oplogEntry = std::move(swOplogEntry.getValue());
1112
1113 if (mongo::feature_flags::gFeatureFlagPrimaryDrivenIndexBuilds
1114 .isEnabledUseLastLTSFCVWhenUninitialized(
1115 VersionContext::getDecoration(opCtx),
1116 serverGlobalParams.featureCompatibility.acquireFCVSnapshot())) {
1117 return index_builds::primary_driven::commit(opCtx,
1118 entry.getNss().dbName(),
1119 oplogEntry.collUUID,
1120 oplogEntry.buildUUID,
1121 oplogEntry.indexes,
1122 oplogEntry.multikey);
1123 }
1124
1125 auto* indexBuildsCoordinator = IndexBuildsCoordinator::get(opCtx);
1126 indexBuildsCoordinator->applyCommitIndexBuild(opCtx, oplogEntry);
1127 return Status::OK();
1128 },
1129 {ErrorCodes::IndexAlreadyExists,
1130 ErrorCodes::IndexBuildAlreadyInProgress,
1131 ErrorCodes::NamespaceNotFound,
1132 ErrorCodes::NoSuchKey}}},
…lines 1133–1139 unchanged (7 lines)
1140
1141 auto swOplogEntry = IndexBuildOplogEntry::parse(opCtx, *op);
1142 if (!swOplogEntry.isOK()) {
1143 return swOplogEntry.getStatus().withContext(
1144 "Error parsing 'abortIndexBuild' oplog entry");
1145 }
1146 auto oplogEntry = std::move(swOplogEntry.getValue());
1147
1148 if (mongo::feature_flags::gFeatureFlagPrimaryDrivenIndexBuilds
1149 .isEnabledUseLastLTSFCVWhenUninitialized(
1150 VersionContext::getDecoration(opCtx),
1151 serverGlobalParams.featureCompatibility.acquireFCVSnapshot())) {
1152 return index_builds::primary_driven::abort(opCtx,
1153 op->getNss().dbName(),
1154 oplogEntry.collUUID,
1155 oplogEntry.buildUUID,
1156 oplogEntry.indexes,
1157 *oplogEntry.cause);
1158 }
1159
1160 IndexBuildsCoordinator::get(opCtx)->applyAbortIndexBuild(opCtx, oplogEntry);
1161 return Status::OK();
1162 },
1163 {ErrorCodes::NamespaceNotFound}}},
1164 {"collMod",
1165 {[](OperationContext* opCtx, const ApplierOperation& op, OplogApplication::Mode mode)
1166 -> Status {
…lines 1167–3230 unchanged (2064 lines)

Before

translation_unit
comment "/**\n * Copyright (C) 2018-present MongoDB, Inc.\n *\n * "...
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/oplog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/error_codes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/init.h"
" "\""
comment "// IWYU pragma: keep"
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/initializer.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsonelement.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsonobjbuilder.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsontypes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/util/bson_extract.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/client/read_preference.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/crypto/oplog_key_entry_handler.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/auth/authorization_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/change_stream_pre_images_collection_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/client.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/collection_crud/collection_write_path.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/commands.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/curop.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/database_name.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/dbdirectclient.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/dbhelpers.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/import_collection_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index/index_constants.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_build_oplog_entry.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_builds_coordinator.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_builds_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/namespace_string.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/op_observer/op_observer.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/op_observer/op_observer_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/pipeline/change_stream_preimage_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/profile_settings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/find_command.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/delete.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/delete_request_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update_request.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update_result.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/write_ops_parsers.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/always_allow_non_local_writes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/apply_ops.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/create_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/dbcheck/dbcheck.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/image_collection_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/intent_guard.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/local_oplog_info.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/optime.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/read_concern_args.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_client_info.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_server_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_settings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/replication_coordinator.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/set_multikey_metadata_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/timestamp_block.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/transaction_oplog_application.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/truncate_range_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/rss/replicated_storage_service.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/server_feature_flags_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/service_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/session/logical_session_id_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/ddl/coll_mod_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/d_concurrency.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/exception_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/lock_manager_defs.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/backwards_compatible_colle"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/catalog_raii.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/coll_mod.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection_catalog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection_options.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/create_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/database.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/database_holder.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/db_raii.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/document_validation.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_database.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_indexes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/index_catalog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/index_descriptor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/rename_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/uncommitted_catalog_update"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_role.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/transaction_resources.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/sharding_environment/shard_id.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/sharding_environment/sharding_feature_flags_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/stats/counters.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/stats/server_write_concern_metrics.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/ident.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/kv/kv_engine.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/oplog_truncate_marker_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/record_data.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/recovery_unit.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_engine.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_engine_direct_crud.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_options.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/write_unit_of_work.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/tenant_id.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/timeseries/upgrade_downgrade_viewless_timeseries.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/timeseries/upgrade_downgrade_viewless_timeseries_op"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/transaction/transaction_participant.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/update/update_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/version_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/versioning_protocol/shard_version.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/idl/idl_parser.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/logv2/log.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/platform/compiler.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/rpc/op_msg.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/assert_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/decorable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/fail_point.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/file.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/namespace_string_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/processinfo.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/serialization_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/stacktrace.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/str.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/string_map.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/version/releases.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<algorithm>"
preproc_include
#include "#include"
system_lib_string "<array>"
preproc_include
#include "#include"
system_lib_string "<cstdint>"
preproc_include
#include "#include"
system_lib_string "<boost/cstdint.hpp>"
preproc_include
#include "#include"
system_lib_string "<boost/optional.hpp>"
preproc_def
#define "#define"
identifier "MONGO_LOGV2_DEFAULT_COMPONENT"
preproc_arg "::mongo::logv2::LogComponent::kReplication"
namespace_definition
namespace "namespace"
namespace_identifier "mongo"
declaration_list
{ "{"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "string_literals"
; ";"
alias_declaration
using "using"
type_identifier "IndexVersion"
= "="
type_descriptor
qualified_identifier
namespace_identifier "IndexDescriptor"
:: "::"
type_identifier "IndexVersion"
; ";"
namespace_definition
namespace "namespace"
namespace_identifier "repl"
declaration_list
{ "{"
namespace_definition (+885 nodes collapsed)
comment "// namespace"
namespace_definition (+411 nodes collapsed)
comment "// namespace internal"
declaration
type_identifier "ApplyImportCollectionFn"
init_declarator
identifier "applyImportCollection"
= "="
identifier "applyImportCollectionDefault"
; ";"
function_definition
primitive_type "void"
function_declarator
identifier "registerApplyImportCollectionFn"
parameter_list
( "("
parameter_declaration
type_identifier "ApplyImportCollectionFn"
identifier "func"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
identifier "applyImportCollection"
= "="
identifier "func"
; ";"
} "}"
function_definition (+963 nodes collapsed)
comment "/**\n * @param dataImage can be BSONObj::isEmpty to signal th"...
function_definition (+443 nodes collapsed)
comment "/* we write to local.oplog.rs:\n { ts : ..., v: ..., op: "...
function_definition (+502 nodes collapsed)
function_definition (+861 nodes collapsed)
function_definition (+265 nodes collapsed)
namespace_definition (+533 nodes collapsed)
comment "// namespace"
function_definition (+730 nodes collapsed)
function_definition (+62 nodes collapsed)
function_definition (+53 nodes collapsed)
comment "// -------------------------------------"
namespace_definition
namespace "namespace"
declaration_list
{ "{"
function_definition (+145 nodes collapsed)
function_definition (+91 nodes collapsed)
function_definition (+85 nodes collapsed)
function_definition (+145 nodes collapsed)
comment "/**\n * Returns whether to timestamp the write with the 'ts' "...
function_definition (+127 nodes collapsed)
alias_declaration (+40 nodes collapsed)
struct_specifier (+29 nodes collapsed)
; ";"
declaration
type_qualifier
const "const"
template_type
type_identifier "StringMap"
template_argument_list
< "<"
type_descriptor
type_identifier "ApplyOpMetadata"
> ">"
init_declarator
identifier "kOpsMap"
= "="
initializer_list
{ "{"
initializer_list (+773 nodes collapsed)
, ","
initializer_list (+513 nodes collapsed)
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "startIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
reference_declarator
& "&"
identifier "entry"
= "="
pointer_expression
* "*"
identifier "op"
; ";"
declaration (+43 nodes collapsed)
if_statement (+40 nodes collapsed)
declaration (+23 nodes collapsed)
comment "// Sanitize storage engine options to remove options which m"...
comment "// See SERVER-68122."
declaration (+22 nodes collapsed)
declaration
type_qualifier
const "const"
primitive_type "bool"
init_declarator
identifier "shouldGenerateInternalIdents"
= "="
binary_expression
field_expression
identifier "oplogEntry"
. "."
field_identifier "indexBuildMethod"
== "=="
qualified_identifier
namespace_identifier "IndexBuildMethodEnum"
:: "::"
identifier "kHybrid"
; ";"
for_range_loop (+108 nodes collapsed)
declaration
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
type_identifier "ApplicationMode"
init_declarator
identifier "applicationMode"
= "="
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
qualified_identifier
namespace_identifier "ApplicationMode"
:: "::"
identifier "kNormal"
; ";"
if_statement (+30 nodes collapsed)
expression_statement (+23 nodes collapsed)
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
comment "// These index related error codes needs to be ignored durin"...
comment "// indexes can already be cloned during initial sync databas"...
comment "// no-op. During steady state, since DDL oplogs are applied "...
comment "// these errors."
initializer_list (+22 nodes collapsed)
} "}"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "commitIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
reference_declarator
& "&"
identifier "entry"
= "="
pointer_expression
* "*"
identifier "op"
; ";"
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "swOplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildOplogEntry"
:: "::"
identifier "parse"
argument_list
( "("
identifier "opCtx"
, ","
identifier "entry"
) ")"
; ";"
if_statement (+40 nodes collapsed)
declaration
placeholder_type_specifier
auto "auto"
init_declarator
pointer_declarator
* "*"
identifier "indexBuildsCoordinator"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
identifier "get"
argument_list
( "("
identifier "opCtx"
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "indexBuildsCoordinator"
-> "->"
field_identifier "applyCommitIndexBuild"
argument_list
( "("
identifier "opCtx"
, ","
call_expression
field_expression
identifier "swOplogEntry"
. "."
field_identifier "getValue"
argument_list
( "("
) ")"
) ")"
; ";"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
initializer_list (+22 nodes collapsed)
} "}"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "abortIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "swOplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildOplogEntry"
:: "::"
identifier "parse"
argument_list
( "("
identifier "opCtx"
, ","
pointer_expression
* "*"
identifier "op"
) ")"
; ";"
if_statement (+40 nodes collapsed)
expression_statement
call_expression
field_expression
call_expression
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
identifier "get"
argument_list
( "("
identifier "opCtx"
) ")"
-> "->"
field_identifier "applyAbortIndexBuild"
argument_list
( "("
identifier "opCtx"
, ","
call_expression
field_expression
identifier "swOplogEntry"
. "."
field_identifier "getValue"
argument_list
( "("
) ")"
) ")"
; ";"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
initializer_list
{ "{"
qualified_identifier
namespace_identifier "ErrorCodes"
:: "::"
identifier "NamespaceNotFound"
} "}"
} "}"
} "}"
, ","
initializer_list (+362 nodes collapsed)
, ","
initializer_list (+65 nodes collapsed)
, ","
initializer_list (+79 nodes collapsed)
, ","
initializer_list (+175 nodes collapsed)
, ","
initializer_list (+130 nodes collapsed)
, ","
initializer_list (+197 nodes collapsed)
, ","
initializer_list (+276 nodes collapsed)
, ","
initializer_list (+82 nodes collapsed)
, ","
initializer_list (+59 nodes collapsed)
, ","
initializer_list (+59 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+369 nodes collapsed)
, ","
initializer_list (+262 nodes collapsed)
, ","
initializer_list (+502 nodes collapsed)
, ","
initializer_list (+142 nodes collapsed)
} "}"
; ";"
comment "// Writes a change stream pre-image 'preImage' associated wi"...
comment "// operation to collection 'collection'."
function_definition (+163 nodes collapsed)
function_definition (+143 nodes collapsed)
} "}"
comment "// namespace"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kInitialSyncOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kStableRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kUnstableRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kSecondaryOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kApplyOpsCmdOplogApplicationMode"
; ";"
function_definition (+116 nodes collapsed)
function_definition (+178 nodes collapsed)
function_definition (+307 nodes collapsed)
function_definition (+35 nodes collapsed)
comment "// Logger for oplog constraint violations."
declaration
type_identifier "OplogConstraintViolationLogger"
pointer_declarator
* "*"
identifier "oplogConstraintViolationLogger"
; ";"
function_definition (+31 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+1062 nodes collapsed)
function_definition (+160 nodes collapsed)
function_definition (+1032 nodes collapsed)
comment "// @return failure status if an update should have happened "...
comment "// See replset initial sync code."
function_definition (+7116 nodes collapsed)
function_definition (+749 nodes collapsed)
function_definition (+2317 nodes collapsed)
function_definition (+44 nodes collapsed)
function_definition (+189 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+73 nodes collapsed)
function_definition (+74 nodes collapsed)
} "}"
comment "// namespace repl"
} "}"
comment "// namespace mongo"

After

translation_unit
comment "/**\n * Copyright (C) 2018-present MongoDB, Inc.\n *\n * "...
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/oplog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/error_codes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/init.h"
" "\""
comment "// IWYU pragma: keep"
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/base/initializer.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsonelement.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsonobjbuilder.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/bsontypes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/bson/util/bson_extract.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/client/read_preference.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/crypto/oplog_key_entry_handler.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/auth/authorization_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/change_stream_pre_images_collection_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/client.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/collection_crud/collection_write_path.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/commands.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/curop.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/database_name.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/dbdirectclient.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/dbhelpers.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/import_collection_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index/index_constants.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_build_oplog_entry.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_builds_coordinator.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/index_builds_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/index_builds/primary_driven/util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/namespace_string.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/op_observer/op_observer.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/op_observer/op_observer_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/pipeline/change_stream_preimage_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/profile_settings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/find_command.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/delete.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/delete_request_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update_request.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/update_result.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/query/write_ops/write_ops_parsers.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/always_allow_non_local_writes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/apply_ops.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/create_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/dbcheck/dbcheck.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/image_collection_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/intent_guard.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/local_oplog_info.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/optime.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/read_concern_args.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_client_info.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_server_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/repl_settings.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/replication_coordinator.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/set_multikey_metadata_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/timestamp_block.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/transaction_oplog_application.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/repl/truncate_range_oplog_entry_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/rss/replicated_storage_service.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/server_feature_flags_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/service_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/session/logical_session_id_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/ddl/coll_mod_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/d_concurrency.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/exception_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/lock_manager/lock_manager_defs.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/backwards_compatible_colle"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/catalog_raii.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/coll_mod.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection_catalog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/collection_options.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/create_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/database.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/database_holder.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/db_raii.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/document_validation.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_database.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/drop_indexes.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/index_catalog.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/index_descriptor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/rename_collection.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_catalog/uncommitted_catalog_update"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/shard_role.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/shard_role/transaction_resources.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/sharding_environment/shard_id.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/sharding_environment/sharding_feature_flags_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/stats/counters.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/stats/server_write_concern_metrics.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/ident.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/kv/kv_engine.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/oplog_truncate_marker_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/record_data.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/recovery_unit.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_engine.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_engine_direct_crud.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_options.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/storage_parameters_gen.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/storage/write_unit_of_work.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/tenant_id.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/timeseries/upgrade_downgrade_viewless_timeseries.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/timeseries/upgrade_downgrade_viewless_timeseries_op"...
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/transaction/transaction_participant.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/update/update_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/version_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/db/versioning_protocol/shard_version.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/idl/idl_parser.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/logv2/log.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/platform/compiler.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/rpc/op_msg.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/assert_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/decorable.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/fail_point.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/file.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/namespace_string_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/processinfo.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/serialization_context.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/stacktrace.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/str.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/string_map.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "mongo/util/version/releases.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<algorithm>"
preproc_include
#include "#include"
system_lib_string "<array>"
preproc_include
#include "#include"
system_lib_string "<cstdint>"
preproc_include
#include "#include"
system_lib_string "<boost/cstdint.hpp>"
preproc_include
#include "#include"
system_lib_string "<boost/optional.hpp>"
preproc_def
#define "#define"
identifier "MONGO_LOGV2_DEFAULT_COMPONENT"
preproc_arg "::mongo::logv2::LogComponent::kReplication"
namespace_definition
namespace "namespace"
namespace_identifier "mongo"
declaration_list
{ "{"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "string_literals"
; ";"
alias_declaration
using "using"
type_identifier "IndexVersion"
= "="
type_descriptor
qualified_identifier
namespace_identifier "IndexDescriptor"
:: "::"
type_identifier "IndexVersion"
; ";"
namespace_definition
namespace "namespace"
namespace_identifier "repl"
declaration_list
{ "{"
namespace_definition (+885 nodes collapsed)
comment "// namespace"
namespace_definition (+411 nodes collapsed)
comment "// namespace internal"
declaration
type_identifier "ApplyImportCollectionFn"
init_declarator
identifier "applyImportCollection"
= "="
identifier "applyImportCollectionDefault"
; ";"
function_definition
primitive_type "void"
function_declarator
identifier "registerApplyImportCollectionFn"
parameter_list
( "("
parameter_declaration
type_identifier "ApplyImportCollectionFn"
identifier "func"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
identifier "applyImportCollection"
= "="
identifier "func"
; ";"
} "}"
function_definition (+963 nodes collapsed)
comment "/**\n * @param dataImage can be BSONObj::isEmpty to signal th"...
function_definition (+443 nodes collapsed)
comment "/* we write to local.oplog.rs:\n { ts : ..., v: ..., op: "...
function_definition (+502 nodes collapsed)
function_definition (+861 nodes collapsed)
function_definition (+265 nodes collapsed)
namespace_definition (+533 nodes collapsed)
comment "// namespace"
function_definition (+730 nodes collapsed)
function_definition (+62 nodes collapsed)
function_definition (+53 nodes collapsed)
comment "// -------------------------------------"
namespace_definition
namespace "namespace"
declaration_list
{ "{"
function_definition (+145 nodes collapsed)
function_definition (+91 nodes collapsed)
function_definition (+85 nodes collapsed)
function_definition (+145 nodes collapsed)
comment "/**\n * Returns whether to timestamp the write with the 'ts' "...
function_definition (+127 nodes collapsed)
alias_declaration (+40 nodes collapsed)
struct_specifier (+29 nodes collapsed)
; ";"
declaration
type_qualifier
const "const"
template_type
type_identifier "StringMap"
template_argument_list
< "<"
type_descriptor
type_identifier "ApplyOpMetadata"
> ">"
init_declarator
identifier "kOpsMap"
= "="
initializer_list
{ "{"
initializer_list (+773 nodes collapsed)
, ","
initializer_list (+513 nodes collapsed)
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "startIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
reference_declarator
& "&"
identifier "entry"
= "="
pointer_expression
* "*"
identifier "op"
; ";"
declaration (+43 nodes collapsed)
if_statement (+40 nodes collapsed)
declaration (+23 nodes collapsed)
comment "// Sanitize storage engine options to remove options which m"...
comment "// See SERVER-68122."
declaration (+22 nodes collapsed)
declaration
type_qualifier
const "const"
primitive_type "bool"
init_declarator
identifier "shouldGenerateInternalIdents"
= "="
binary_expression
field_expression
identifier "oplogEntry"
. "."
field_identifier "indexBuildMethod"
== "=="
qualified_identifier
namespace_identifier "IndexBuildMethodEnum"
:: "::"
identifier "kHybrid"
; ";"
for_range_loop (+108 nodes collapsed)
if_statement
if "if"
condition_clause
( "("
call_expression
field_expression
qualified_identifier
namespace_identifier "mongo"
:: "::"
qualified_identifier
namespace_identifier "feature_flags"
:: "::"
identifier "gFeatureFlagPrimaryDrivenIndexBuilds"
. "."
field_identifier "isEnabledUseLastLTSFCVWhenUninitialized"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "VersionContext"
:: "::"
identifier "getDecoration"
argument_list
( "("
identifier "opCtx"
) ")"
, ","
call_expression
field_expression
field_expression
identifier "serverGlobalParams"
. "."
field_identifier "featureCompatibility"
. "."
field_identifier "acquireFCVSnapshot"
argument_list
( "("
) ")"
) ")"
) ")"
compound_statement
{ "{"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "index_builds"
:: "::"
qualified_identifier
namespace_identifier "primary_driven"
:: "::"
identifier "start"
argument_list
( "("
identifier "opCtx"
, ","
call_expression
field_expression
call_expression
field_expression
identifier "entry"
. "."
field_identifier "getNss"
argument_list
( "("
) ")"
. "."
field_identifier "dbName"
argument_list
( "("
) ")"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "collUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "buildUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "indexes"
) ")"
; ";"
} "}"
declaration
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
type_identifier "ApplicationMode"
init_declarator
identifier "applicationMode"
= "="
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
qualified_identifier
namespace_identifier "ApplicationMode"
:: "::"
identifier "kNormal"
; ";"
if_statement (+30 nodes collapsed)
expression_statement (+23 nodes collapsed)
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
comment "// These index related error codes needs to be ignored durin"...
comment "// indexes can already be cloned during initial sync databas"...
comment "// no-op. During steady state, since DDL oplogs are applied "...
comment "// these errors."
initializer_list (+22 nodes collapsed)
} "}"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "commitIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
type_qualifier
const "const"
placeholder_type_specifier
auto "auto"
init_declarator
reference_declarator
& "&"
identifier "entry"
= "="
pointer_expression
* "*"
identifier "op"
; ";"
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "swOplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildOplogEntry"
:: "::"
identifier "parse"
argument_list
( "("
identifier "opCtx"
, ","
identifier "entry"
) ")"
; ";"
if_statement (+40 nodes collapsed)
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
call_expression
field_expression
identifier "swOplogEntry"
. "."
field_identifier "getValue"
argument_list
( "("
) ")"
) ")"
; ";"
if_statement
if "if"
condition_clause
( "("
call_expression
field_expression
qualified_identifier
namespace_identifier "mongo"
:: "::"
qualified_identifier
namespace_identifier "feature_flags"
:: "::"
identifier "gFeatureFlagPrimaryDrivenIndexBuilds"
. "."
field_identifier "isEnabledUseLastLTSFCVWhenUninitialized"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "VersionContext"
:: "::"
identifier "getDecoration"
argument_list
( "("
identifier "opCtx"
) ")"
, ","
call_expression
field_expression
field_expression
identifier "serverGlobalParams"
. "."
field_identifier "featureCompatibility"
. "."
field_identifier "acquireFCVSnapshot"
argument_list
( "("
) ")"
) ")"
) ")"
compound_statement
{ "{"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "index_builds"
:: "::"
qualified_identifier
namespace_identifier "primary_driven"
:: "::"
identifier "commit"
argument_list
( "("
identifier "opCtx"
, ","
call_expression
field_expression
call_expression
field_expression
identifier "entry"
. "."
field_identifier "getNss"
argument_list
( "("
) ")"
. "."
field_identifier "dbName"
argument_list
( "("
) ")"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "collUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "buildUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "indexes"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "multikey"
) ")"
; ";"
} "}"
declaration
placeholder_type_specifier
auto "auto"
init_declarator
pointer_declarator
* "*"
identifier "indexBuildsCoordinator"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
identifier "get"
argument_list
( "("
identifier "opCtx"
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "indexBuildsCoordinator"
-> "->"
field_identifier "applyCommitIndexBuild"
argument_list
( "("
identifier "opCtx"
, ","
identifier "oplogEntry"
) ")"
; ";"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
initializer_list (+22 nodes collapsed)
} "}"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "abortIndexBuild"
" "\""
, ","
initializer_list
{ "{"
lambda_expression
lambda_capture_specifier
[ "["
] "]"
abstract_function_declarator (+28 nodes collapsed)
compound_statement
{ "{"
if_statement (+33 nodes collapsed)
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "swOplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "IndexBuildOplogEntry"
:: "::"
identifier "parse"
argument_list
( "("
identifier "opCtx"
, ","
pointer_expression
* "*"
identifier "op"
) ")"
; ";"
if_statement (+40 nodes collapsed)
declaration
placeholder_type_specifier
auto "auto"
init_declarator
identifier "oplogEntry"
= "="
call_expression
qualified_identifier
namespace_identifier "std"
:: "::"
identifier "move"
argument_list
( "("
call_expression
field_expression
identifier "swOplogEntry"
. "."
field_identifier "getValue"
argument_list
( "("
) ")"
) ")"
; ";"
if_statement
if "if"
condition_clause
( "("
call_expression
field_expression
qualified_identifier
namespace_identifier "mongo"
:: "::"
qualified_identifier
namespace_identifier "feature_flags"
:: "::"
identifier "gFeatureFlagPrimaryDrivenIndexBuilds"
. "."
field_identifier "isEnabledUseLastLTSFCVWhenUninitialized"
argument_list
( "("
call_expression
qualified_identifier
namespace_identifier "VersionContext"
:: "::"
identifier "getDecoration"
argument_list
( "("
identifier "opCtx"
) ")"
, ","
call_expression
field_expression
field_expression
identifier "serverGlobalParams"
. "."
field_identifier "featureCompatibility"
. "."
field_identifier "acquireFCVSnapshot"
argument_list
( "("
) ")"
) ")"
) ")"
compound_statement
{ "{"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "index_builds"
:: "::"
qualified_identifier
namespace_identifier "primary_driven"
:: "::"
identifier "abort"
argument_list
( "("
identifier "opCtx"
, ","
call_expression
field_expression
call_expression
field_expression
identifier "op"
-> "->"
field_identifier "getNss"
argument_list
( "("
) ")"
. "."
field_identifier "dbName"
argument_list
( "("
) ")"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "collUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "buildUUID"
, ","
field_expression
identifier "oplogEntry"
. "."
field_identifier "indexes"
, ","
pointer_expression
* "*"
field_expression
identifier "oplogEntry"
. "."
field_identifier "cause"
) ")"
; ";"
} "}"
expression_statement
call_expression
field_expression
call_expression
qualified_identifier
namespace_identifier "IndexBuildsCoordinator"
:: "::"
identifier "get"
argument_list
( "("
identifier "opCtx"
) ")"
-> "->"
field_identifier "applyAbortIndexBuild"
argument_list
( "("
identifier "opCtx"
, ","
identifier "oplogEntry"
) ")"
; ";"
return_statement
return "return"
call_expression
qualified_identifier
namespace_identifier "Status"
:: "::"
identifier "OK"
argument_list
( "("
) ")"
; ";"
} "}"
, ","
initializer_list
{ "{"
qualified_identifier
namespace_identifier "ErrorCodes"
:: "::"
identifier "NamespaceNotFound"
} "}"
} "}"
} "}"
, ","
initializer_list (+362 nodes collapsed)
, ","
initializer_list (+65 nodes collapsed)
, ","
initializer_list (+79 nodes collapsed)
, ","
initializer_list (+175 nodes collapsed)
, ","
initializer_list (+130 nodes collapsed)
, ","
initializer_list (+197 nodes collapsed)
, ","
initializer_list (+276 nodes collapsed)
, ","
initializer_list (+82 nodes collapsed)
, ","
initializer_list (+59 nodes collapsed)
, ","
initializer_list (+59 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+86 nodes collapsed)
, ","
initializer_list (+369 nodes collapsed)
, ","
initializer_list (+262 nodes collapsed)
, ","
initializer_list (+502 nodes collapsed)
, ","
initializer_list (+142 nodes collapsed)
} "}"
; ";"
comment "// Writes a change stream pre-image 'preImage' associated wi"...
comment "// operation to collection 'collection'."
function_definition (+163 nodes collapsed)
function_definition (+143 nodes collapsed)
} "}"
comment "// namespace"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kInitialSyncOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kStableRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kUnstableRecoveringOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kSecondaryOplogApplicationMode"
; ";"
declaration
type_qualifier
constexpr "constexpr"
type_identifier "StringData"
qualified_identifier
namespace_identifier "OplogApplication"
:: "::"
identifier "kApplyOpsCmdOplogApplicationMode"
; ";"
function_definition (+116 nodes collapsed)
function_definition (+178 nodes collapsed)
function_definition (+307 nodes collapsed)
function_definition (+35 nodes collapsed)
comment "// Logger for oplog constraint violations."
declaration
type_identifier "OplogConstraintViolationLogger"
pointer_declarator
* "*"
identifier "oplogConstraintViolationLogger"
; ";"
function_definition (+31 nodes collapsed)
function_definition (+75 nodes collapsed)
function_definition (+1062 nodes collapsed)
function_definition (+160 nodes collapsed)
function_definition (+1032 nodes collapsed)
comment "// @return failure status if an update should have happened "...
comment "// See replset initial sync code."
function_definition (+7116 nodes collapsed)
function_definition (+749 nodes collapsed)
function_definition (+2317 nodes collapsed)
function_definition (+44 nodes collapsed)
function_definition (+189 nodes collapsed)
function_definition (+33 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+73 nodes collapsed)
function_definition (+74 nodes collapsed)
} "}"
comment "// namespace repl"
} "}"
comment "// namespace mongo"