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

Improve data structure layering

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 13
    • Storage - Ra 2022-01-24

      Summary

      The goal of this spike would be to reduce the complexity of one of the large data structures in WiredTiger. It should find a set of data structure members that belong to a single subsystem, and move them somewhere more obviously associated with that subsystem. It should also make an attempt to ensure those members are only directly accessed from that subsystem.

      An example model of where this has been (sort of) done is the WT_CACHE data structure, which hangs off the WT_CONNECTION.

      Care should be taken to choose a modest and achievable change with this spike.

      A candidate might be moving the recovery specific fields from the WT_CONNECTION structure into their own data structure. Some of the fields that would be candidates for that are:

      • rec_maximum_seconds
      • recovery_ckpt_*
      • recovery_[major|minor|patch]
      • compat_[major|minor]
      • req_max_[major|minor|patch]

      As a starting point these could be pulled into a sub-data-structure WT_CONN_RECOVERY or similar. Then if it’s possible to limit where they are accessed, that data structure could be passed as a parameter to relevant functions rather than being referenced from the connection.

      Motivation

      • Does this affect any team outside of WT? No
      • How likely is it that this use case or problem will occur? N/A
      • If the problem does occur, what are the consequences and how severe are they? N/A
      • Is this issue urgent? No

      Acceptance Criteria (Definition of Done)

      At least one collection of data structure members have been moved out of one of the existing large WiredTiger data structures into a smaller sub-data-structure, and the related code refactored appropriately.

      Testing

      New tests should be created if required, and all existing WiredTiger tests should continue to pass.

      Documentation update

      TBD

       

            Assignee:
            will.korteland@mongodb.com Will Korteland
            Reporter:
            jeremy.thorp@mongodb.com Jeremy Thorp
            Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: