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

Investigate a solution to avoid FTDC stalls during checkpoint

    • Storage Engines
    • 8
    • TheMoon-StorEng - 2023-09-19, NachoCheese - 2023-10-03, Joker - StorEng - 2023-10-17
    • v7.1, v7.0, v6.0, v5.0, v4.4

      In WT-7534, we investigated why FTDC stalls when a checkpoint occurs. Since checkpointing and retrieving statistics require a lock on the tables they work on, they cannot happen at the same time. The lock required by a checkpoint is WT_WITH_TABLE_READ_LOCK and the locks required by the statistics processing are WT_WITH_SCHEMA_LOCK and WT_WITH_TABLE_WRITE_LOCK in __wt_curstat_table_init.

      Reproducing the issue:

      The issue can be reproduced through the many-coll-test. It is possible to add a sleep inside WT_WITH_TABLE_READ_LOCK when the checkpoint requires it to emphasize the stalls. See this comment:


      Scope of the ticket:

      • Find a solution to avoid those stalls coming from:
        • __wt_schema_open_indices
          • Suggestion: Before calling __wt_schema_open_indices, can we know if there are any indices ? Can we give the caller the possibility to skip those indices ?
        • And __wt_schema_get_table

      Definition of done:

      Agree on the best solution for the issue and create a new ticket to implement the solution.

        1. with code change.png
          with code change.png
          25 kB
        2. without code change.png
          without code change.png
          24 kB

            monica.ng@mongodb.com Monica Ng
            etienne.petrel@mongodb.com Etienne Petrel
            0 Vote for this issue
            35 Start watching this issue