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

Rework assertion that we don't discard required history

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.9, 4.0.2, 4.1.2, WT3.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Storage Non-NYC 2018-07-02, Storage Non-NYC 2018-07-16, Storage Engines 2018-07-30, Storage Engines 2018-08-13

      There is an assertion when we have just finished evicting a page that we have seen fire once in testing:

      2018-05-30T23:21:40.880+0000 E STORAGE [thread17] WiredTiger error (0) [1527722500:880252][39746:0x3fff9942ee30], file:collection-31--7788036076520929582.wt, eviction-server: __evict_review, 670: __wt_page_is_modified(page) || __wt_txn_visible_all(session, page->modify->rec_max_txn, WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp))
      2018-05-30T23:21:40.880+0000 E STORAGE [thread17] WiredTiger error (0) [1527722500:880396][39746:0x3fff9942ee30], file:collection-31--7788036076520929582.wt, eviction-server: aborting WiredTiger library
      

      The comment describing the assertion is:

               * If the page is clean, assert that reconciliation 
               * was configured for a lookaside table, or it's not a durable object   
               * (currently the lookaside table), or all page updates were globally   
               * visible.              
      

      Which doesn't match the actual assertion:

      WT_ASSERT(session,                                                      
                  __wt_page_is_modified(page) ||                                      
                  __wt_txn_visible_all(session, page->modify->rec_max_txn,            
                  WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp))); 
      

      I believe we should add in a check for lookaside eviction here:

      WT_ASSERT(session,                                                      
                  __wt_page_is_modified(page) ||
                  LF_ISSET(WT_REC_LOOKASIDE) ||
                  __wt_txn_visible_all(session, page->modify->rec_max_txn,            
                  WT_TIMESTAMP_NULL(&page->modify->rec_max_timestamp))); 
      

      It's OK to evict a clean page with necessary history when that history was written to lookaside.

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: