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

Lookaside table cursors not operating at isolation level WT_ISO_READ_UNCOMMITTED

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1, WT10.0.0, 4.2.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Storage Engines 2019-10-07

      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.

       

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

              Created:
              Updated:
              Resolved: