Skip to content

Commit fe4ae2c

Browse files
mattsimplytoto-devlynne-wangbshteinfeldRedBeard0531
authored and
MongoDB Bot
committed
SERVER-102479: Investigate and add missing #pragma once in query header files (#34780)
Co-authored-by: Tommaso Tocci <[email protected]> Co-authored-by: Lynne Wang <[email protected]> Co-authored-by: Ben Shteinfeld <[email protected]> Co-authored-by: Mathias Stearn <[email protected]> Co-authored-by: Ronald Steinke <[email protected]> Co-authored-by: ben-gawel <[email protected]> Co-authored-by: Gregory Noma <[email protected]> Co-authored-by: Evan Bergeron <[email protected]> Co-authored-by: Nathan Frank <[email protected]> Co-authored-by: Erwin Pe <[email protected]> Co-authored-by: David Goffredo <[email protected]> Co-authored-by: David Goffredo <[email protected]> Co-authored-by: Erin McNulty <[email protected]> Co-authored-by: Guy-Jacques Isombe <[email protected]> Co-authored-by: seanzimm <[email protected]> GitOrigin-RevId: af2c516a7659168814c3f46c10b802ece412d050
1 parent 8875ce6 commit fe4ae2c

40 files changed

+80
-1
lines changed

src/mongo/db/catalog/index_catalog_entry_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/catalog/index_catalog_entry.h"
3133
#include "mongo/db/index/index_access_method.h"
3234
#include "mongo/db/update_index_data.h"

src/mongo/db/change_stream_pre_image_test_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/change_stream_options_gen.h"
3133
#include "mongo/db/change_stream_options_manager.h"
3234
#include "mongo/db/change_stream_pre_images_truncate_markers_per_nsUUID.h"

src/mongo/db/commands/profile_cmd_test_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/commands/profile_common.h"
3133
#include "mongo/db/commands/profile_gen.h"
3234
#include "mongo/db/profile_settings.h"

src/mongo/db/commands/query_cmd/acquire_locks.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <boost/optional.hpp>
3133
#include <memory>
3234

src/mongo/db/commands/query_cmd/killcursors_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/audit.h"
3133
#include "mongo/db/client.h"
3234
#include "mongo/db/namespace_string.h"

src/mongo/db/curop_failpoint_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <boost/none.hpp>
3133
#include <boost/optional/optional.hpp>
3234
#include <functional>

src/mongo/db/exec/query_shard_server_test_fixture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <memory>
3133

3234
#include "mongo/client/index_spec.h"

src/mongo/db/exec/sbe/sbe_block_test_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <vector>
3133

3234
#include <boost/optional/optional.hpp>

src/mongo/db/exec/sbe/stages/stage_visitors.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/exec/sbe/stages/ix_scan.h"
3133

3234
namespace mongo::sbe {

src/mongo/db/exec/sbe/values/bsoncolumn_materializer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "bson_block.h"
3133
#include "mongo/bson/bsonobj.h"
3234
#include "mongo/bson/column/bsoncolumn.h"

src/mongo/db/exec/sbe/values/generic_compare.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <boost/cstdint.hpp>
3133
#include <boost/optional/optional.hpp>
3234
#include <cmath>

src/mongo/db/pipeline/accumulator_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/exec/document_value/value.h"
3133
#include "mongo/db/pipeline/variables.h"
3234

src/mongo/db/pipeline/document_source_mock_stages.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/document_source_mock.h"
3133
#include "mongo/db/pipeline/expression_context_for_test.h"
3234
#include <boost/intrusive_ptr.hpp>

src/mongo/db/pipeline/percentile_algo_continuous.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*/
2929
#pragma once
3030

31+
#pragma once
32+
3133
#include <boost/optional/optional.hpp>
3234

3335
#include "mongo/db/pipeline/percentile_algo_accurate.h"

src/mongo/db/pipeline/percentile_algo_discrete.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* exception statement from all source files in the program, then also delete
2727
* it in the license file.
2828
*/
29+
2930
#pragma once
3031

3132
#include <boost/optional/optional.hpp>

src/mongo/db/pipeline/pipeline_test_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/document_source_match.h"
3133
#include "mongo/db/pipeline/pipeline.h"
3234

src/mongo/db/pipeline/search/lite_parsed_search.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/lite_parsed_pipeline.h"
3133

3234
namespace mongo {

src/mongo/db/pipeline/search/search_helper_bson_obj.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "document_source_list_search_indexes.h"
3133
#include "mongo/db/pipeline/search/document_source_list_search_indexes.h"
3234
#include "mongo/db/pipeline/search/document_source_search.h"

src/mongo/db/pipeline/sort_reorder_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/document_source.h"
3133
#include "mongo/db/pipeline/document_source_graph_lookup.h"
3234
#include "mongo/db/pipeline/document_source_lookup.h"

src/mongo/db/pipeline/spilling/spilling_test_fixture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/spilling/spilling_test_process_interface.h"
3133
#include "mongo/db/service_context_d_test_fixture.h"
3234

src/mongo/db/pipeline/spilling/spilling_test_process_interface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/process_interface/stub_mongo_process_interface.h"
3133

3234
namespace mongo {

src/mongo/db/pipeline/visitors/document_source_visitor_docs_needed_bounds.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/pipeline/pipeline.h"
3133
#include "mongo/db/pipeline/visitors/docs_needed_bounds.h"
3234
#include "mongo/db/pipeline/visitors/docs_needed_bounds_gen.h"

src/mongo/db/query/canonical_query_test_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <memory>
3133

3234
#include "mongo/base/string_data.h"

src/mongo/db/query/classic_runtime_planner_for_sbe/classic_runtime_planner_for_sbe_test_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/exec/sbe/stages/stages.h"
3133

3234
namespace mongo::sbe {

src/mongo/db/query/find_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/query/client_cursor/cursor_response.h"
3133
#include "mongo/db/query/find.h"
3234
#include "mongo/db/query/plan_executor.h"

src/mongo/db/query/plan_cache/plan_cache_test_util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* exception statement from all source files in the program, then also delete
2727
* it in the license file.
2828
*/
29+
30+
#pragma once
31+
2932
#include "mongo/db/exec/plan_cache_callbacks_impl.h"
3033
#include "mongo/db/query/canonical_query.h"
3134
#include "mongo/db/query/plan_cache/classic_plan_cache.h"

src/mongo/db/query/query_bm_fixture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <benchmark/benchmark.h>
3133
#include <string>
3234
#include <vector>

src/mongo/db/query/query_planner_test_lib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
/**
3133
* This file contains tests for mongo/db/query/query_planner.cpp
3234
*/

src/mongo/db/query/query_tester/command_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <string>
3133

3234
#include "mongo/client/dbclient_connection.h"

src/mongo/db/query/query_tester/file_helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <boost/container_hash/hash.hpp>
3133
#include <filesystem>
3234
#include <limits>

src/mongo/db/query/query_tester/mock_version_info.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/util/version.h"
3133

3234
namespace mongo::query_tester {

src/mongo/db/query/query_tester/test.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <filesystem>
3133
#include <fstream>
3234
#include <string>

src/mongo/db/query/query_tester/testfile.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <fstream>
3133
#include <string>
3234
#include <vector>

src/mongo/db/query/search/search_index_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/bson/bsonobj.h"
3133
#include "mongo/db/namespace_string.h"
3234
#include "mongo/db/operation_context.h"

src/mongo/db/query/search/search_index_process_interface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/namespace_string.h"
3133
#include "mongo/db/operation_context.h"
3234
#include "mongo/db/views/resolved_view.h"

src/mongo/db/query/search/search_index_process_router.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
* it in the license file.
2828
*/
2929

30-
#include "mongo/db/query/search/search_index_process_interface.h"
30+
#pragma once
3131

32+
#include "mongo/db/query/search/search_index_process_interface.h"
3233

3334
namespace mongo {
3435

src/mongo/db/query/search/search_index_process_shard.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/db/query/search/search_index_process_interface.h"
3133

3234
namespace mongo {

src/mongo/db/query/shard_filterer_factory_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <memory>
3133

3234
#include "mongo/db/catalog/collection.h"

src/mongo/db/query/write_ops/insert.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include "mongo/base/status.h"
3133
#include "mongo/base/status_with.h"
3234
#include "mongo/bson/bsonobj.h"

src/mongo/db/update/update_util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* it in the license file.
2828
*/
2929

30+
#pragma once
31+
3032
#include <boost/optional/optional.hpp>
3133

3234
#include "mongo/db/exec/mutable_bson/document.h"

0 commit comments

Comments
 (0)