[SERVER-47486] Refactor getID() and locking in SSLThreadInfo Created: 10/Apr/20 Updated: 06/Dec/22 Resolved: 14/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Amirsaman Memaripour | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Service Arch
|
| Participants: |
| Description |
|
We can replace the getID() function in SSLThreadInfo (see here) with OS-specific APIs (e.g, gettid() on Linux and GetCurrentThreadId() on Windows) that provide the same functionality. The getID() function is only required by versions before OpenSSL 1.1.0, and removing it would simplify the code and facilitate maintenance. Also, the locking functionality in SSLThreadInfo can be simplified/improved to use a singleton pattern. |