[SERVER-74718] dbcheck doesn't check MinKey Created: 09/Mar/23  Updated: 21/Jun/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: pm-855-quick-win
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-74681 Allow dbhash to accept an _id range Closed
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

dbcheck always uses a BoundInclusion::kIncludeEndKeyOnly, and always passes into the InternalPlanner a minimum value of MinKey, so that minimum value is excluded from the hash.

If in dbcheck.js you add the godinsert below (an insert that doesn't go into the oplog), you would expect the test to fail but it does not. This will be partially fixed in SERVER-74681, but likely not fully fixed.

// Name for a collection which takes multiple batches to check and which shouldn't be modified
// by any of the tests.
const multiBatchSimpleCollName = "dbcheck-simple-collection";
const multiBatchSimpleCollSize = 10000;
replSet.getPrimary().getDB(dbName)[multiBatchSimpleCollName].insertMany(
    [...Array(10000).keys()].map(x => ({_id: x})), {ordered: false});
 
// This should cause this test to fail.
assert.commandWorked(replSet.getPrimary().getDB(dbName).runCommand(
    {godinsert: multiBatchSimpleCollName, obj: {_id: MinKey}}));
}}


Generated at Thu Feb 08 06:28:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.