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

Recovery doesn't open an internal session.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • WT2.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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.

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: