Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74718

dbcheck doesn't check MinKey

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

      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:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: