Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-36796

"timeOfCreation" field in PlanCacheEntry is actually the time of the last transition to isActive:true

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
    • Query Execution

      There are cases where we overwrite the PlanCacheEntry stored in the cache, creating a new entry with a new "timeOfCreation". This means that the output of planCacheListPlans and $planCacheStats may be confusing. For example, when an inactive cache entry transitions to active, it will get a new "timeOfCreation" value.

      See here:

      https://github.com/mongodb/mongo/blob/7bc9953a256c1fab8b772812e712b909fefc4535/src/mongo/db/query/plan_cache.cpp#L776-L787

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: