Operational Defect Database

BugZero found this defect 94 days ago.

MongoDB | 2578765

Resharding should validate user provided zone range doesn't include $-prefixed fields.

Last update date:

3/13/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0.0-rc0

5.0.26

6.0.15

7.0.7

Description:

Info

Resharding currently doesn't validate that the user provided zone range doesn't include $ prefixed fields. This could lead to the reshardCollection command beginning but failing to persist chunk metadata with the error: _id fields may not contain '$'-prefixed fields: $maxKey is not valid for storage. We should probably do something similar to what updateZoneKeyRange does and call ShardKeyPattern::checkShardKeyIsValidForMetadataStorage().

Top User Comments

xgen-internal-githook commented on Fri, 8 Mar 2024 16:31:58 +0000: Author: {'name': 'Erin Liang', 'email': '59406045+erl-ang@users.noreply.github.com', 'username': 'erl-ang'} Message: SERVER-86717 Resharding should validate user provided zone range doesn't include $-prefixed fields. (#19551) (cherry picked from commit eae5a264cdad29b5f8cf6978e9a0d7cad2800924) GitOrigin-RevId: 23ed51caf19e82867a78cca568896af7e1052689 Branch: v5.0 https://github.com/mongodb/mongo/commit/a4fd6890b6d8e6f95f8f31d8800d82d01ce02446 xgen-internal-githook commented on Fri, 8 Mar 2024 16:23:01 +0000: Author: {'name': 'Erin Liang', 'email': '59406045+erl-ang@users.noreply.github.com', 'username': 'erl-ang'} Message: SERVER-86717 Resharding should validate user provided zone range doesn't include $-prefixed fields. (#19551) (cherry picked from commit eae5a264cdad29b5f8cf6978e9a0d7cad2800924) GitOrigin-RevId: f703dd9d6b5a4c61e86ef1e08bdce2ff52514163 Branch: v7.0 https://github.com/mongodb/mongo/commit/c25a0bfbab4f9f800366db1e6393402c8bbfd7fb xgen-internal-githook commented on Fri, 8 Mar 2024 16:11:01 +0000: Author: {'name': 'Erin Liang', 'email': '59406045+erl-ang@users.noreply.github.com', 'username': 'erl-ang'} Message: SERVER-86717 Resharding should validate user provided zone range doesn't include $-prefixed fields. (#19551) (cherry picked from commit eae5a264cdad29b5f8cf6978e9a0d7cad2800924) GitOrigin-RevId: ecc034f1403f07b2f21aa939429286332e3b2c27 Branch: v6.0 https://github.com/mongodb/mongo/commit/0605a750ef71518613aa20ba5b8dc0507a2ce65c xgen-internal-githook commented on Tue, 5 Mar 2024 01:43:30 +0000: Author: {'name': 'Erin Liang', 'email': '59406045+erl-ang@users.noreply.github.com', 'username': 'erl-ang'} Message: SERVER-86717 Resharding should validate user provided zone range doesn't include $-prefixed fields. (#19551) GitOrigin-RevId: eae5a264cdad29b5f8cf6978e9a0d7cad2800924 Branch: master https://github.com/mongodb/mongo/commit/42af339bbfc4a1805f4ad916530832615a933bbf

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...