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

Recovery doesn't open an internal session.

    Details

    • Type: Question
    • Status: Resolved
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None
    • # Replies:
      2
    • Last comment by Customer:
      true

      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.

        Activity

        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

        Message: WT-2167 Switch recovery to using an internal session.

        It used to open and close a session handle that wasn't marked
        internal. No functional change since recovery closes the handle
        when it is done and the primary difference between internal and
        non-internal sessions is during connection close.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/28fa01ba7dc6a737d619dfea52d279dd6e2ae2f9

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: WT-2167 Switch recovery to using an internal session. It used to open and close a session handle that wasn't marked internal. No functional change since recovery closes the handle when it is done and the primary difference between internal and non-internal sessions is during connection close. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/28fa01ba7dc6a737d619dfea52d279dd6e2ae2f9
        Hide
        xgen-internal-githook Githook User added a comment -

        Author:

        {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

        Message: Merge pull request #2250 from wiredtiger/recover-internal-session

        WT-2167 Switch recovery to using an internal session.
        Branch: develop
        https://github.com/wiredtiger/wiredtiger/commit/2865a76754b417f42f91018739136b20e313642a

        Show
        xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2250 from wiredtiger/recover-internal-session WT-2167 Switch recovery to using an internal session. Branch: develop https://github.com/wiredtiger/wiredtiger/commit/2865a76754b417f42f91018739136b20e313642a

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 28 weeks, 1 day ago
              Date of 1st Reply: