Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11532

Fix session reset RNG by using cursor RNG

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 8
    • BermudaTriangle- 2023-09-05, TheMoon-StorEng - 2023-09-19, NachoCheese - 2023-10-03, Joker - StorEng - 2023-10-17, Asparagus-StorEng - 2023-10-31, 2023-11-28 - Anthill Tiger
    • v7.2

      From WT-8003, we have noticed that the reshard collection test skews the random cursor due to having a few number of entries per page. The test creates large value sizes for each record where only 10-20 entries can fit per page. The specific test shows a weakness in WiredTiger

      1. Calls __wt_random_descent, which randomly from the root page chooses a random child page until we reach a leaf page.
      2. If disk records are > 1000, find a visible record from page disk.
      3. Look to find a visible record from the insert list
      4. If disk records are < 200 or the leaf page is clean, try to find a visible page disk.
      5. Last step, clear the cursor position and compute a random record between 0 - 250 entries and perform bt_curnext and bt_curprev until we find a visible record, which can be on a different page than our original page that we descended from.

      This ticket aims to look into investigating any changes to the random algorithm specific to the reshard collection test. There has been some recommendations to look into investigating the reasons why we chose magic constants of 1000, 200 and 250 and look into changing up the numbers that work better for this workload. We will also need to be aware that the random cursor doesn't affect the randomness of other test cases too, this can be done through a patch build.

        1. grep_mongo.log
          975 kB
        2. image-2023-10-09-16-58-29-481.png
          image-2023-10-09-16-58-29-481.png
          498 kB
        3. mongod.log
          29.65 MB
        4. screenshot-1.png
          screenshot-1.png
          26 kB
        5. Screenshot 2023-11-19 at 19.16.47.png
          Screenshot 2023-11-19 at 19.16.47.png
          268 kB
        6. wt-11532-repro.patch
          13 kB

            Assignee:
            jie.chen@mongodb.com Jie Chen
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: