-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
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-113238for another race condition we fixed around this shutdown.
- depends on
-
SERVER-117272 Include connPoolStats in mongod FTDC
-
- Closed
-
- is related to
-
SERVER-113238 shutdownSearchExecutorsIfNeeded should wait for task executors to be cleaned up
-
- Closed
-