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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.2.2, 4.3.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Execution Team 2019-11-18, Execution Team 2019-12-02
    • Not Needed

      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.

        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

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

              Created:
              Updated:
              Resolved: