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

Consolidate cache config validation into a single function

    • Storage Engines
    • 5
    • Nick - 2024-04-30, Megabat - 2024-05-14, 2024-05-28 - FOLLOW ON SPRINT, 2024-06-11 - Dinosaurs go rawr, 2024-06-25 - Climbing BTrees

      Currently we have validation logic for cache trigger and target levels in two locations:

      • In __wt_cache_create which asserts that target thresholds must be lower than their respective trigger thresholds
      • In __cache_config_local where the code ensures that dirty/update trigger thresholds are smaller than the overall eviction trigger threshold, and dirty/update target thresholds are smaller than the overall eviction target threshold.

      However, the validation in __wt_cache_create only runs on cache creation - not reconfigure - and the validation in __cache_config_local is performed silently and doesn't notify the user that they've provided an invalid cache configuration.

      This ticket is to create a dedicated validate_cache_config function which performs that checks mentioned above and runs on both cache creation and on cache reconfigure. Additional checks may be added if they make sense.
      This function should validate the trigger and target thresholds before they are set in the WT_CACHE structure and return an error when an invalid config is detected.

            Assignee:
            jasmine.bi@mongodb.com Jasmine Bi
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: