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

Enable more logs in specific scenarios

    • 5
    • Storage - Ra 2022-04-04

      Summary
      In some scenarios, we would like to have more logs when an issue may arise. For instance, when the cache is stuck for a certain amount of time or when eviction is taking too long.

      Acceptance Criteria (Definition of Done)
      Create a way to enable more logs of a category under certain circumstances. It should be possible to disable those additional logs when required as well. For instance, we could enable more logs related to checkpoint/eviction when a checkpoint is blocked because it is waiting for eviction to finish and disable those logs if the checkpoint is no longer blocked. Another area where we could improve logs is when we might get to a cache stuck issue, as described in WT-8156

      Suggested Solution
      A possible solution would be to do something along those lines:

      #define WT_VERBOSE_[CACHE|EVICTION|...]_EXTRA(session, category, message)
          if(ISSET(S2C(session), VERBOSE_[CACHE|EVICTION|...]_TIMEOUTFLAG)
             __wt_verbose_notice(session, category, message)
         else
             __wt_verbose(session, category, message)
      

      By doing this, if the flag is set, i.e VERBOSE_CACHE_TIMEOUTFLAG, all logs will be printed as wt_verbose_notice would be used. All wt_verbose calls related to the cache category should be replaced with the new macro in order to work. 

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: