Add search metrics to connPoolStats

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Added FTDC collection for search task executor metrics to improve diagnostics.

      Because FTDC runs throughout the shutdown process, this patch also adds some concurrency control to the shutdown behavior of accessing the search TaskExecutors.

      Key changes:

      • Added a mutex to protect access to the task executors during shutdown
      • Changed the return type of `getMongotTaskExecutor` and `getSearchIndexManagementTaskExecutor` to `StatusWith<std::shared_ptr<TaskExecutor>>` to properly handle shutdown state
      • Added error handling to return `ErrorCodes::ShutdownInProgress` when attempting to access executors during shutdown
      • Updated existing call sites to handle the new return type with `uassertStatusOK.` These avoided the race because we typically stop servicing new requests before we begin to shut down the task executors here, so all accesses from within query code were not subject to this particular race - see SERVER-113238 for another race condition we fixed around this shutdown.

            Assignee:
            Charlie Swanson
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: