Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c6921bc
SERVER-113431 Pin copybara to a specific tag (#43548) (#43553)
zackwintermdb Nov 7, 2025
893fc1e
SERVER-113700 [v7.0] Update copybara to v20251110 (#43804) (#44163)
zackwintermdb Dec 1, 2025
5393ef6
SERVER-115497: [v7.0.28] Fix for SERVER-115508 (#45267)
spencerjackson Dec 15, 2025
0963bb7
SERVER-115917 set specific Visual Studio and MSVC install version (#4…
dmoody256 Jan 9, 2026
a0c24e9
SERVER-102364 Periodically check $reduce accumulated depth less than……
evanbergeron Jan 12, 2026
b2ee1cd
SERVER-113532 Introduce a slightly higher BSONObj size limit for wire…
jsteemann Jan 12, 2026
5ad1d00
SERVER-94315: Ensure shard filtering is applied for non-simple collat…
jameseh96 Jan 12, 2026
4e33c5e
SERVER-114838, SERVER-115296: Salt ResourceIds with a random value ac…
jordiolivares Jan 12, 2026
18aa977
SERVER-113888 SERVER-113889 Internal-only indices can only be created…
benjaminpearce-mdb Jan 12, 2026
18545c5
SERVER-113685 SERVER-113900 SERVER-113897 Disallow wildcard index cre…
militsasotirova Jan 12, 2026
dc07c42
SERVER-114695 Update default value for pending connections (#46149)
coleharbeck Jan 12, 2026
836dc4a
SERVER-99119 Change geo-related invariants to tasserts (#43314) (#46101)
awagenmaker Jan 12, 2026
ba47ba9
SERVER-112952 Consider 'filter' in profile cmd auth check [v7.0.29-ho…
cswanson310 Jan 12, 2026
67cb4b9
SERVER-115693 fix detecting current git repo on windows (#45764) (#46…
zackwintermdb Jan 13, 2026
6dac2b8
SERVER-116494 SERVER-116496 SERVER-116498 Cap memory consumption of n…
samanca Jan 13, 2026
b409fb4
SERVER-116496 Reset contractTracking before parsing initializing `Ope…
samanca Jan 13, 2026
f679bf1
SERVER-118713 Revert SERVER-113888 SERVER-113889 (#47356)
benjaminpearce-mdb Feb 2, 2026
ef85473
SERVER-121686 Fix config server crash on config.mongos delete
amit777 Mar 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,22 @@ env_vars.Add(
default=version_data['githash'],
)

VSINSTALLDIR = 'C:/Program Files/Microsoft Visual Studio/2022/Professional'
MSVC_TOOLSET_VERSION = "14.31.31103"

env_vars.Add('MSVC_USE_SCRIPT', help='Sets the script used to setup Visual Studio.',
default=f'{VSINSTALLDIR}/VC/Auxiliary/Build/vcvarsall.bat')

env_vars.Add('VSINSTALLDIR', help='The path where Visual Studio is installed.',
default=VSINSTALLDIR)

env_vars.Add('MSVC_USE_SCRIPT_ARGS', help='Sets the script used to setup Visual Studio.',
default=f'x64 -vcvars_ver={MSVC_TOOLSET_VERSION}')

env_vars.Add(
'MSVC_USE_SCRIPT',
help='Sets the script used to setup Visual Studio.',
'MSVC_TOOLSET_VERSION',
help='Sets the full toolset version of Visual C++ to use.',
default=MSVC_TOOLSET_VERSION,
)

env_vars.Add(
Expand All @@ -1271,12 +1284,6 @@ env_vars.Add(
default="14.3",
)

env_vars.Add(
'MSVC_TOOLSET_VERSION',
help='Sets the full toolset version of Visual C++ to use.',
default="14.31.31103",
)

env_vars.Add(
'LINKFLAGS_COMPILER_EXEC_PREFIX',
help='Specify the search path to be injected into the LINKFLAGS',
Expand Down Expand Up @@ -1647,6 +1654,9 @@ envDict = dict(
LIBDEPS_TAG_EXPANSIONS=[],
MSVC_VERSION=variables_only_env.get("MSVC_VERSION"),
MSVC_TOOLSET_VERSION=variables_only_env.get("MSVC_TOOLSET_VERSION"),
VSINSTALLDIR=variables_only_env.get("VSINSTALLDIR"),
MSVC_USE_SCRIPT=variables_only_env.get("MSVC_USE_SCRIPT"),
MSVC_USE_SCRIPT_ARGS=variables_only_env.get("MSVC_USE_SCRIPT_ARGS"),
)

# By default, we will get the normal SCons tool search. But if the
Expand Down
2 changes: 2 additions & 0 deletions buildscripts/resmokelib/mongod_fuzzer_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def generate_independent_parameters(rng, mode):
ret["minSnapshotHistoryWindowInSeconds"] = rng.choice([300, rng.randint(5, 600)])
# TODO (SERVER-75632): Uncomment this to enable passthrough testing.
# ret["lockCodeSegmentsInMemory"] = rng.choice([True, False])
ret["preAuthMaximumMessageSizeBytes"] = rng.randint(65536, 16777216)
ret["capMemoryConsumptionForPreAuthBuffers"] = rng.randint(80, 100)

return ret

Expand Down
18 changes: 13 additions & 5 deletions buildscripts/resmokelib/multiversionconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ def generate_releases_file():

def in_git_root_dir():
"""Return True if we are in the root of a git directory."""
if call(["git", "branch"], stderr=STDOUT, stdout=DEVNULL) != 0:
# We are not in a git directory.
try:
if call(["git", "branch"], stderr=STDOUT, stdout=DEVNULL) != 0:
# We are not in a git directory.
return False
except FileNotFoundError:
# Git is not even installed.
return False

git_root_dir = check_output("git rev-parse --show-toplevel", shell=True, text=True).strip()
# Always use forward slash for the cwd path to resolve inconsistent formatting with Windows.
curr_dir = os.getcwd().replace("\\", "/")
git_root_dir = os.path.realpath(
check_output("git rev-parse --show-toplevel", shell=True, text=True).strip())
curr_dir = os.path.realpath(os.getcwd())
# python on windows under version 3.8 can have
# weird behavior with identifying the real drive
curr_dir = curr_dir.replace("Z:\\", "C:\\")
git_root_dir = git_root_dir.replace("Z:\\", "C:\\")
return git_root_dir == curr_dir


Expand Down
6 changes: 6 additions & 0 deletions buildscripts/sync_repo_with_copybara.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from buildscripts.util.read_config import read_config_file
from evergreen.api import RetryingEvergreenApi

# Commit hash of Copybara to use (v20251110)
COPYBARA_COMMIT_HASH = "3f050c9e08b84aeda98875bf1b02a3288d351333"


def run_command(command): # noqa: D406
"""
Expand Down Expand Up @@ -107,6 +110,9 @@ def main():
else:
run_command("git clone https://github.com/10gen/copybara.git")

# Checkout the specific commit of Copybara we want to use
run_command(f"cd copybara && git checkout {COPYBARA_COMMIT_HASH}")

# Navigate to the Copybara directory and build the Copybara Docker image
run_command("cd copybara && docker build --rm -t copybara .")

Expand Down
8 changes: 8 additions & 0 deletions etc/backports_required_for_multiversion_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,14 @@ last-continuous:
ticket: SERVER-103960
- test_file: jstests/core/txns/multi_statement_transaction_abort.js
ticket: SERVER-84081
- test_file: jstests/aggregation/expressions/reduce_overflow.js
ticket: SERVER-102364
- test_file: jstests/change_streams/ddl_create_drop_index_events.js
ticket: SERVER-93153
- test_file: jstests/change_streams/resume_expanded_events.js
ticket: SERVER-93153
- test_file: jstests/replsets/insert_documents_close_to_size_limit.js
ticket: SERVER-113532
suites: null
last-lts:
all:
Expand Down Expand Up @@ -1314,8 +1318,12 @@ last-lts:
ticket: SERVER-103960
- test_file: jstests/core/txns/multi_statement_transaction_abort.js
ticket: SERVER-84081
- test_file: jstests/aggregation/expressions/reduce_overflow.js
ticket: SERVER-102364
- test_file: jstests/change_streams/ddl_create_drop_index_events.js
ticket: SERVER-93153
- test_file: jstests/change_streams/resume_expanded_events.js
ticket: SERVER-93153
- test_file: jstests/replsets/insert_documents_close_to_size_limit.js
ticket: SERVER-113532
suites: null
2 changes: 1 addition & 1 deletion evergreen/multiversion_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ db-contrib-tool setup-repro-env \
--fallbackToMaster \
--resmokeCmd "python buildscripts/resmoke.py" \
--debug \
$last_lts_arg 5.0
$last_lts_arg 5.0 7.0.25
50 changes: 50 additions & 0 deletions jstests/aggregation/expressions/reduce_overflow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Verify the server does not crash when $reduce creates a deeply nested intermediate document.
*/
const coll = db[jsTestName()];

let seenSuccess = false;
let seenOverflow = false;
let recursiveObject = {"a": "$$value.array"};
let depth = 0;
for (let recursiveObjectDepth = 10; recursiveObjectDepth < 150; recursiveObjectDepth *= 2) {
while (depth < recursiveObjectDepth) {
recursiveObject = {"a": recursiveObject};
depth = depth + 1;
}

const pipeline = [
{"$group": {"_id": null, "entries": {"$push": "$value"}}},
{
"$project": {
"filtered": {
"$reduce": {
"input": "$entries",
"initialValue": {"array": []},
"in": {"array": [recursiveObject]}
}
}
}
}
];

for (let numDocs = 10; numDocs < 500; numDocs *= 2) {
coll.drop();
const bulk = coll.initializeUnorderedBulkOp();
for (let i = 0; i < numDocs; i++) {
bulk.insert({"value": 0});
}
assert.commandWorked(bulk.execute());
try {
coll.aggregate(pipeline);
seenSuccess = true;
assert(!seenOverflow);
} catch (error) {
assert(seenSuccess);
assert(error.code === ErrorCodes.Overflow, error);
jsTest.log("Pipeline exceeded max BSON depth", numDocs, recursiveObjectDepth);
seenOverflow = true;
}
}
}
assert(seenOverflow, "expected test to trigger overflow case");
16 changes: 16 additions & 0 deletions jstests/auth/lib/commands_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -5805,6 +5805,22 @@ export const authCommandsLib = {
}
]
},
{
testname: "profileFilter",
command: {profile: -1, filter: {$alwaysTrue: 1}},
testcases: [
{
runOnDb: firstDbName,
roles: roles_dbAdmin,
privileges: [{resource: {db: firstDbName, collection: ""}, actions: ["enableProfiler"]}],
},
{
runOnDb: secondDbName,
roles: roles_dbAdminAny,
privileges: [{resource: {db: secondDbName, collection: ""}, actions: ["enableProfiler"]}],
},
],
},
{
testname: "profile_mongos",
command: {profile: 0, slowms: 10, sampleRate: 0.5},
Expand Down
99 changes: 97 additions & 2 deletions jstests/core/compound_wildcard_index_validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ assert.commandWorked(
// Tests that _id can be excluded in an inclusion projection statement.
assert.commandWorked(
coll.createIndex({"$**": 1, "other": 1}, {"wildcardProjection": {"_id": 0, "a": 1}}));
// Tests that _id can be inccluded in an exclusion projection statement.
// Tests that _id can be included in an exclusion projection statement.
assert.commandWorked(coll.createIndex({"$**": 1, "another": 1},
{"wildcardProjection": {"_id": 1, "a": 0, "another": 0}}));
assert.commandWorked(
coll.createIndex({"$**": 1, "yetAnother": 1}, {"wildcardProjection": {"_id": 1}}));

// Tests we wildcard projections allow nested objects.
// Tests wildcard projections allow nested objects.
assert.commandWorked(
coll.createIndex({"$**": 1, "d": 1}, {"wildcardProjection": {"a": {"b": 1, "c": 1}}}));

Expand Down Expand Up @@ -67,10 +69,55 @@ assert.commandFailedWithCode(coll.createIndex({"a.$**": 1, b: 1}, {expireAfterSe
// 'wildcardProjection' is not specified.
assert.commandFailedWithCode(coll.createIndex({a: 1, "$**": 1}), 67);

// Tests that the wildcardProjection cannot be empty.
assert.commandFailedWithCode(coll.createIndex({a: 1, "$**": 1}, {wildcardProjection: {}}),
ErrorCodes.FailedToParse);

// Tests that a wildcardProjection is not allowed for non-wildcard indexes.
assert.commandFailedWithCode(coll.createIndex({a: 1, b: 1}, {wildcardProjection: {c: 1}}),
ErrorCodes.BadValue);

// Tests that wildcardProjection cannot include regular index fields.
assert.commandFailedWithCode(coll.createIndex({a: 1, "$**": 1}, {wildcardProjection: {a: 1}}),
7246208);
assert.commandFailedWithCode(coll.createIndex({a: 1, "$**": 1}, {wildcardProjection: {a: 1, b: 1}}),
7246208);
assert.commandFailedWithCode(
coll.createIndex({a: 1, "$**": 1, b: 1}, {wildcardProjection: {a: 1, b: 1}}), 7246208);
assert.commandFailedWithCode(coll.createIndex({_id: 1, "$**": 1}, {wildcardProjection: {_id: 1}}),
7246208);

// Tests that a wildcardProjection can only mix inclusion/exclusion projections with _id.
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, c: 1}, {wildcardProjection: {_id: 0, a: 0, b: 1}}), 7246211);
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, c: 1}, {wildcardProjection: {_id: 1, a: 0, b: 1}}), 7246211);
assert.commandWorked(coll.createIndex({"$**": 1, "c": 1}, {wildcardProjection: {"_id": 0, b: 1}}));
assert.commandWorked(coll.createIndex({"$**": 1, "e": 1}, {wildcardProjection: {"_id": 1, e: 0}}));
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, "_id": 1, "e": 1}, {wildcardProjection: {"_id": 1, e: 0}}),
7246209,
);
assert.commandWorked(
coll.createIndex({"$**": 1, "_id": 1, "e": 1}, {wildcardProjection: {"_id": 0, a: 1}}));

// Tests that wildcard projections accept only numeric values.
assert.commandFailedWithCode(
coll.createIndex({"st": 1, "$**": 1}, {wildcardProjection: {"a": "something"}}), 51271);

// Tests that just excluding _id is not valid in the wildcardProjection, unless the regular part is
// _id.
assert.commandFailedWithCode(coll.createIndex({"a": 1, "$**": 1}, {wildcardProjection: {"_id": 0}}),
7246210);
assert.commandFailedWithCode(coll.createIndex({"$**": 1, "a": 1}, {wildcardProjection: {"_id": 0}}),
7246210);
assert.commandFailedWithCode(
coll.createIndex({"b": 1, "$**": 1, "a": 1}, {wildcardProjection: {"_id": 0}}), 7246210);
assert.commandWorked(coll.createIndex({"_id": 1, "$**": 1}, {wildcardProjection: {"_id": 0}}));
assert.commandWorked(coll.createIndex({"$**": 1, "_id": 1}, {wildcardProjection: {"_id": 0}}));
assert.commandFailedWithCode(
coll.createIndex({"_id": 1, "$**": 1, "a": 1}, {wildcardProjection: {"_id": 0}}), 7246210);

// Tests that all compound wildcard indexes in the catalog can be validated by running validate()
// command.

Expand All @@ -79,6 +126,54 @@ assert.commandWorked(coll.createIndex({a: 1, "b.$**": 1, str: 1}));
assert.commandWorked(coll.createIndex({"b.$**": 1, str: 1}));
assert.commandWorked(coll.createIndex({a: 1, "b.$**": 1}));
assert.commandWorked(coll.createIndex({"$**": 1}));
assert.commandWorked(
coll.createIndex({"b": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 1}}));
assert.commandWorked(
coll.createIndex({"_id": 1, "a": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 0}}));
assert.commandFailedWithCode(
coll.createIndex({"a": 1, "_id": 1, "$**": 1}, {wildcardProjection: {"a": 0}}), 7246209);
assert.commandFailedWithCode(
coll.createIndex({"a": 1, "b": 1, "$**": 1}, {wildcardProjection: {"b": 0}}), 7246209);
assert.commandWorked(
coll.createIndex({"a": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 0}}));
assert.commandWorked(
coll.createIndex({"e": 1, "$**": 1}, {wildcardProjection: {"_id": 1, "f": 1}}));
assert.commandFailedWithCode(
coll.createIndex({"b": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 0}}), 7246210);
assert.commandFailedWithCode(
coll.createIndex({"a": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 1}}), 7246208);
assert.commandFailedWithCode(
coll.createIndex({"a": 1, "$**": 1}, {wildcardProjection: {"_id": 1, "a": 1}}), 7246208);
assert.commandFailedWithCode(
coll.createIndex({"_id": 1, "$**": 1}, {wildcardProjection: {"_id": 1, "a": 1}}), 7246208);
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, "d": 1}, {wildcardProjection: {"_id": 1, e: 0}}), 7246209);

// Dotted paths
assert.commandWorked(
coll.createIndex({"_id": 1, "a.b": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 0}}));
assert.commandFailedWithCode(
coll.createIndex({"_id": 1, "a": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a.b": 0}}),
7246209,
);
assert.commandWorked(
coll.createIndex({"a.b": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 0}}));
assert.commandFailedWithCode(
coll.createIndex({"a": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a.b": 0}}), 7246209);
assert.commandWorked(
coll.createIndex({"$**": 1, "_id": 1, "e.b": 1}, {wildcardProjection: {"_id": 0, "a.b": 1}}));
assert.commandWorked(
coll.createIndex({"b.c": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a": 1}}));
assert.commandWorked(
coll.createIndex({"b.d": 1, "$**": 1}, {wildcardProjection: {"_id": 0, "a.b": 1}}));
assert.commandWorked(
coll.createIndex({"$**": 1, "e.b": 1}, {wildcardProjection: {"_id": 1, e: 0}}));
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, "e": 1}, {wildcardProjection: {"_id": 1, "e.b": 0}}), 7246209);
assert.commandFailedWithCode(
coll.createIndex({"$**": 1, "e.c": 1}, {wildcardProjection: {"_id": 1, "e.b": 0}}),
7246210,
);

// Insert documents to index.
for (let i = 0; i < 10; i++) {
Expand Down
Loading