[SERVER-61812] list_local_sessions.js can fail if $listLocalSessions occurs during a cache refresh Created: 30/Nov/21 Updated: 29/Oct/23 Resolved: 16/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc11, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brett Nawrocki | Assignee: | Nandini Bhartiya |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-nyc-subteam1, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v6.0
|
||||||||
| Steps To Reproduce: | Create a failpoint to pause after releasing the lock when swapping during LogicalSessionCacheImpl::_refresh() and wait for it to be entered before calling $listLocalSessions in the test. |
||||||||
| Sprint: | Sharding NYC 2022-06-13, Sharding 2022-06-27 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 15 | ||||||||
| Story Points: | 2 | ||||||||
| Description |
|
list_local_sessions.js will create a session and then will use $listLocalSessions to retrieve all sessions and the current user's sessions and verify that the created session is present. The logical session cache will return these sessions from its _activeSessions. However, during a cache refresh (which happens periodically), these sessions will be temporarily swapped out until the backswapper goes out of scope. It is therefore possible for the $listLocalSessions command to fail to return the created session if the request is processed during this period of time when _activeSessions has been swapped. |
| Comments |
| Comment by Githook User [ 17/Jun/22 ] |
|
Author: {'name': 'nandinibhartiyaMDB', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}Message: |
| Comment by Githook User [ 16/Jun/22 ] |
|
Author: {'name': 'nandinibhartiyaMDB', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}Message: |