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

Reconfiguring eviction opens a race with WT_CONNECTION::close

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.2
    • Affects Version/s: None
    • Component/s: None
    • Storage 2017-03-27, Storage 2017-04-17

      After the eviction.threads_max setting is increased, the eviction server may resize its array of worker contexts and allocate more sessions. This happens asynchronously in the eviction server thread because it owns the eviction worker contexts.

      The problem with this is that we assert when opening a session that we are not in the process of closing the connection. This has been the source of a number of bugs in the past where internal threads can race with connection close if the connection is only open for a short period.

      One possible fix would be to set a flag when the reconfigure happens and have the eviction server clear the flag once it has processed the setting change. WT_CONNECTION::close would have to wait for the flag to be cleared before we start asserting that no new sessions can be opened.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: