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

Opening a cursor may accidentally inherit config from a cached cursor

    • Storage Engines
    • 8
    • 2024-02-06 tapioooooooooooooca, 2024-02-20_A_near-death_puffin, 2024-03-05 - Claronald, 2024-03-19 - PacificOcean, 2024-04-02 - GreatMugshot

      Currently, WiredTiger cursor cache works as follows:

      • Create a cursor if it is opened first. Apply the config to that cursor.
      • Cache the cursor when it is closed but keep all the config as it is.

      After this point, there are two possibilities:

      1. We call the reopen api on the cursor and we get back the exact cursor with the same configuration.
      2. We try to open another cursor with the same uri and we decide to reactivate the cursor that is cached. We apply the configuration of the new configuration.

      In the second case, there is an issue that we never clear the configuration from the cached cursor and when the cursor is reactivated, it implicitly inherits whatever config is already in the cached cursor. This causes unexpected behaviours.

            Assignee:
            tod.johnson@mongodb.com Tod Johnson
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: