[SERVER-46634] LockInfo results missing a layer of hierarchy Created: 05/Mar/20 Updated: 29/Oct/23 Resolved: 10/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Billy Donahue |
| 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 | ||||||||||||
| Sprint: | Dev Tools 2020-03-09, Dev Tools 2020-03-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
It's obvious we're missing a layer of hierarchy in the structure. The group of repeating keys (resourceId,granted,pending) should instead be the keys of a subobject created for each lock in the bucket. existing (bad) format:
|
| Comments |
| Comment by Billy Donahue [ 10/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
Fixed by | |||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
relevant CR https://mongodbcr.appspot.com/578250001 | |||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
Upon further thought, the LockManager's buckets are an implementation detail of its hash table design, and don't need to be exported in dumps or lockInfo results. sample:
| |||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
hang analyzer work overlaps with this, as they produce the same stuff with copy-pasted code. Unifying them. | |||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
Oooh. There's another layer missing internal to the lock request objects in the "granted" and "pending" arrays. dump() (cliient info gets its own subobject) LockInfo (merge client info) | |||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
There's an object per bucket. Buckets contain locks. Locks have 3 properties each. If a bucket might have its own properties, it might also be appropriate to have a bucket be an object containing a "locks" element mapped to that array of locks. Then there's a place to attach the bucket's metadata as other elements of the bucket object. | |||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 05/Mar/20 ] | |||||||||||||||||||||||||||||||||||||
|
What layer is missing? |