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

Lookaside table cursors not operating at isolation level WT_ISO_READ_UNCOMMITTED

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.1, WT10.0.0, 4.2.2
    • None
    • None
    • 3
    • Storage Engines 2019-10-07

    Description

      The lookaside table cursors are not operating at isolation level WT_ISO_READ_UNCOMMITTED as intended.

       

      Ticket WT-3891 in February of 2018 included [commit f74fd95|https://github.com/wiredtiger/wiredtiger/pull/3920/commits/f74fd951dac3efcd8b866314d734196a07c77f6f].

       

      That commit changed the previous code:

      WT_RET(__wt_txn_begin(las_session, NULL));
      las_session->txn.isolation = WT_ISO_READ_UNCOMMITTED;
      

      to:

      static void__las_set_read_uncommitted(
          WT_SESSION_IMPL *session, WT_TXN_ISOLATION *saved_isolationp)
      {
              *saved_isolationp = session->txn.isolation;
              session->txn.isolation = WT_ISO_READ_UNCOMMITTED;
      }
      ...
      __las_set_read_uncommitted(las_session, &saved_isolation);	WT_ERR(__wt_txn_begin(las_session, NULL));
      

      However, the __wt_txn_begin() function blindly sets the isolation level:

      static inline int
      __wt_txn_begin(WT_SESSION_IMPL *session, const char *cfg[])
      {
      	WT_TXN *txn;
       
      	txn = &session->txn;
      	txn->isolation = session->isolation;
              ...
      

      so the change had the effect of changing all LAS operations to operate at the isolation of the underlying WT_SESSION handle, not WT_ISO_READ_UNCOMMITTED as intended.

       

      Summary:

      Fix a bug where lookaside table cursors were not operating at isolation level WT_ISO_READ_UNCOMMITTED as intended.

       

      Attachments

        Activity

          People

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: