[SERVER-37406] A stashed Locker should keep information about the owning transaction Created: 01/Oct/18 Updated: 29/Oct/23 Resolved: 22/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.8, 4.0.15 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||||||||||
| Sprint: | Storage NYC 2019-01-14, Storage NYC 2019-01-28 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 62 | ||||||||||||||||||||||||
| Description |
|
When the hang analyzer runs, it prints information and address of the LockRequests and Lockers for each thread. If that Locker is owned by an idle, stashed transaction, something like this is printed:
This is pretty useless to a debugger, because the information about which session and transaction own that Locker is not attainable from this output. Instead it requires finding the SessionCatalog and searching through the list of sessions. When unsetThreadId() is called, we should replace the thread ID with the owning session ID, or just always keep a reference to the session ID on the locker. |
| Comments |
| Comment by Githook User [ 14/Jan/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit b1830f1ad949059fd7d70cc9490e0216fd30b438) |
| Comment by David Bartley [ 10/Jan/20 ] |
|
Yup, that's what we ended up doing for our 4.0 backport of this. |
| Comment by Benety Goh [ 10/Jan/20 ] |
|
4.0 backport note: The 4.0 changes for TransactionParticipant should be applied to src/mongo/db/session.cpp because we moved the TxnResources class from Session to TransactionParticipant in |
| Comment by David Bartley [ 07/Dec/19 ] |
|
Could this be backported to 4.0 (see |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao'}Message: |