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

Document WT on random cursor functionality

    • 3
    • BermudaTriangle- 2023-09-05, TheMoon-StorEng - 2023-09-19

      Following from the WT-8003, it is not documented on how the random cursor internally chooses a random page. It would be worthwhile for our customers to understand how this works. I grabbed the process on how we grab a record from a tree from WT-8003:

      • Calls __wt_random_descent, which randomly from the root page chooses a random child page until we reach a leaf page.
      • If disk records are > 1000, find a visible record from page disk.
      • Look to find a visible record from the insert list
      • If disk records are < 200 or the leaf page is clean, try to find a visible page disk.
      • 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.

      We should document the above in our documentation.

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

              Created:
              Updated:
              Resolved: