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

Recovery doesn't open an internal session.

    Details

    • Type: Question
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None

      Description

      The wt_txn_recover function doesn't open an internal session, it opens a normal session:

      /* We need a real session for recovery. */
      WT_RET(__wt_open_session(conn, NULL, NULL, true, &session));
      F_SET(session, WT_SESSION_NO_LOGGING);
      r.session = session;
      

      I was looking at this in the context of WT-2140: that ticket concerns freeing temporary allocated memory after an application thread does reconciliation, and the obvious way to do that is based on the WT_SESSION_INTERNAL flag, which recovery won't set. Depending on how many blocks recovery writes, this could potentially slow down recovery.

      If this code is correct, I think it deserves a comment, it's the only place in WiredTiger where an internal action opens a "normal" session.

        Attachments

          Activity

            People

            • Assignee:
              michael.cahill Michael Cahill
              Reporter:
              keith.bostic Keith Bostic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: