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

Spike: Investigate a solution to better pass keys and recno's within WiredTiger

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 8
    • StorEng - Refinement Pipeline

      In WiredTiger we pass keys/recnos into a number of functions including those that have CBT's and or cursors passed into them. The cursor itself has a key member and a recno member, the CBT has a tmp field which often holds a key and a recno field.

      This raises the question of why do we have a key/recno on the cursor but choose to pass keys alongside the cursor? Additionally if the cursor has a recno or a key and the CBT has a recno or a tmp which one should be used?

      Some example functions are:

      • __wt_cursor_valid
      • __wt_row_modify
      • __btcur_bounds_contains_key

      Unless the key is being passed for the purpose of comparison to the key held by the cursor it wouldn't make sense to need the additional key. As such we should be able to track the required state on the cursor or the CBT, which one is best to use isn't exactly clear. Part of the work on this ticket would be to determine whether it makes more sense to go on the cursor or the CBT.

      This is a design problem within WiredTiger and resolving it is likely more than one ticket worth of work. This ticket is intended to track the issue and allow for an investigation to resolve it.

      Scope:

      • Investigate the scope of the problem, i.e. how many functions follow this pattern.
      • Determine if storing the keys in the cursor or the CBT would make the code simpler.
      • Ticket out tickets to improve the code.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: