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

Create split generation history buffer to track how a page gets freed

    • 8
    • StorEng - 2023-06-13, 2023-06-27 Lord of the Sprints

      This ticket stems from WT-10789, and relates to adding functionality to create a history buffer in the aim of adding more diagnostics when a split generation bug occurs. The idea behind the history buffer follows similar to the ref history buffer.

      /*
       * WT_REF_HIST --
       *	State information of a ref at a single point in time.
       */
      struct __wt_ref_hist {
          WT_SESSION_IMPL *session;
          const char *name;
          const char *func;
          uint32_t time_sec;
          uint16_t line;
          uint16_t state;
      };
      

      Context
      When a page gets split, the old page will be split between two new in-memory pages. The old page will be called with __split_safe_free, which places the page into a stash where if no threads are accessing the variable, it will be scheduled to be freed.

      Work to be done
      The split history buffer aims to work very closely how the ref history buffer. The split history aims to add diagnostics to identify from which type of thread the split free was called from. The developer might need to add their own enum struct as well, to manually identify which thread initiated the split free function.
      Defintion of done
      Developers will be able to know how a split free was called on a page prior to it being freed.

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: