dbcheck doesn't check MinKey

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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}}));
      }}
      

            Assignee:
            Unassigned
            Reporter:
            Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: