[SERVER-49455] Improve error reporting in launchServiceWorkerThread() Created: 10/Jul/20 Updated: 12/Oct/21 Resolved: 17/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Benjamin Caimano (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | Service arch 2020-11-30 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
We use launchServiceWorkerThread() to spawn new threads for ServiceExecutorSynchronous. It may return a non-okay status on the event of a failure. However, the information stored in the returned status is sometimes not very useful (see below). We should improve the error reporting components of this function to facilitate debugging.
|
| Comments |
| Comment by Amirsaman Memaripour [ 12/Oct/21 ] |
|
g.fanini@gmail.com, launchServiceWorkerThread() is only called to run the first task for an accepted ingress connection on a mongod/mongos server. Any task, including commands, scheduled after the first one will use the existing thread and won't spawn new threads. See here for reference. This is the expected behavior, both for Linux and Windows, and there are safe-guards to ensure this. |
| Comment by G F [ 03/Oct/21 ] |
|
excuse me, may I ask for an information, is it thinkable that launchServiceWorkerThread is continuously spawning a thread for each command received from a client in a continuous session, at least compiled for windows not linux ? surely I misunderstood ? |
| Comment by Benjamin Caimano (Inactive) [ 17/Nov/20 ] |
|
I think we have this covered between |
| Comment by Amirsaman Memaripour [ 10/Jul/20 ] |
|
One possible solution is to also include error codes in log messages. |