[SERVER-31697] killSessions and friends should remove session record Created: 24/Oct/17 Updated: 08/Jan/24 Resolved: 13/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
killSessions, killAllSessions, and killAllSessionsByPattern should also remove the session record from all LogicalSessionCaches in the cluster, and also remove the record from config.system.sessions. Otherwise, users who run these commands will still see their session records when they use $listSessions and $listLocalSessions, which will be confusing. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 13/Nov/17 ] |
|
This is fine. I'd thought we would need an accurate list of sessions for testing drivers that call endSessions, but after discussing things with mira.carey@mongodb.com we came up with another solution: just use command monitoring to assert that the driver calls endSessions with the correct list of lsids, and that the server reponds with ok: 1. |
| Comment by Kaloian Manassiev [ 25/Oct/17 ] |
|
From how the transaction reaper works, if we don't clean up the transaction table record, the reaper will end up re-creating the session, wouldn't it? But yes, otherwise, no reason not to clean-up the transaction table on kill session in either case. |
| Comment by Samantha Ritter (Inactive) [ 25/Oct/17 ] |
|
schwerin good question, kaloian.manassiev what do you think about this? I would say, yes, we should clean up the transaction table for these records as well. I don't think it makes sense to allow you to retry a write that you killed. |
| Comment by Andy Schwerin [ 25/Oct/17 ] |
|
If they do this, must they also clean up the transactions table? |