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

Fix tree walk code with read-no-wait flag set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.2, 4.2.2, 4.3.3
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Execution Team 2019-11-18, Execution Team 2019-12-02
    • Downstream Team Attention:
      Not Needed

      Description

      I believe there is a bug in __tree_walk_internal, where it is spinning on __wt_page_swap when __wt_page_in encounters a locked ref.

      If my reading of the code is correct, it means the walk will stall waiting on locked refs even if WT_READ_NO_WAIT is specified, which isn't expected.

      The other user of WT_READ_NO_WAIT is the eviction server in __evict_walk_tree, that code has a custom walk function so isn't affected.

      Concretely I think we need to change the loop in __tree_walk_internal around __wt_page_swap to handle WT_NOTFOUND differently if WT_READ_NO_WAIT is configured.

        Attachments

        1. Screen Shot 2019-04-11 at 4.24.48 PM.png
          Screen Shot 2019-04-11 at 4.24.48 PM.png
          464 kB
        2. wt-4565.diff
          4 kB

          Activity

            People

            Assignee:
            gregory.wlodarek Gregory Wlodarek
            Reporter:
            alexander.gorrod Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: