[SERVER-34823] Thread name and connection number are not synchronized in TransportLayerLegacy Created: 03/May/18 Updated: 29/Oct/23 Resolved: 09/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | 3.4.0, 3.6.0 |
| Fix Version/s: | 3.4.16, 3.6.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonathan Reams | Assignee: | Jonathan Reams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v3.4
|
||||||||
| Sprint: | Platforms 2018-05-07, Platforms 2018-05-21 | ||||||||
| Participants: | |||||||||
| Description |
|
In 3.4 we introduced TransportLayerLegacy which wrapped up the legacy Listener/MessagePort classes behind a new abstraction. In 3.4, the log message NETWORK [thread1] connection accepted from 1.2.3.4:34397 #15 (6 connections now open) comes from here:
This gets passed off to TransportLayerLegacy as an AbstractMessagingPort which gets stored in a transport:::Session, which has it's own ID created here:
A thread is started to service the connection, and the first thing it does is set the thread name here:
This is what causes log messages to have their "conn" prefixes like this Because the "accepted" log message and the thread name are coming from different ID numbers, it's possible that the "conn15" log messages are not related to the number in the "connection accepted from" log messages. |
| Comments |
| Comment by Githook User [ 19/Jun/18 ] |
|
Author: {'username': 'jbreams', 'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com'}Message: (cherry picked from commit dd7de2240e42ea384d3804634522739618a6da0a) |
| Comment by Githook User [ 09/May/18 ] |
|
Author: {'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams', 'username': 'jbreams'}Message: |