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

WT_PM_REC_REWRITE cleanup

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

      Reference WT-1919.

      WT_PM_REC_REWRITE is a short-lived page state set in one specific path, when forced eviction of a leaf page fails because there's nothing much to write. The fact it must be a leaf page during eviction is because it is only set in a reconciliation call where WT_EVICT_UPDATE_RESTORE was set. It's short-lived because before we give up the exclusive lock on the page, we create a new page and swap it into place, and discard the page where WT_PM_REC_REWRITE was set.

      For these reasons...

      sync_file (the WT_SYNC_CHECKPOINT operation) should not be checking for WT_PM_REC_REWRITE, it should never see that flag as the checkpoint will be blocked from the leaf page until the eviction is complete.

      rec_root_write should not be checking for WT_PM_REC_REWRITE, it should never see that flag because it's writing internal pages, not leaf pages (and it's not evicting, anyway).

      rec_col_int should not be checking for WT_PM_REC_REWRITE, because any write of a page's column-store internal page parent will be blocked from evaluating the leaf child until the eviction is complete.

      rec_write_wrapup should not be checking for WT_PM_REC_REWRITE, because any previous reconciliation that set WT_PM_REC_REWRITE will have cleared that flag before this reconciliation could proceed.

      rec_write_wrapup_err should not be checking for WT_PM_REC_REWRITE because it's only set when a reconciliation is already considered successful.

      This pretty much removes the need for the WT_PM_REC_REWRITE state – the additional error handling makes me think we'd be better off getting rid of it and using WT_PM_REC_MULTIBLOCK with a single test, if we ended up with 1 block or several blocks.

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

              Created:
              Updated:
              Resolved: