[SERVER-54064] Sessions on arbiters accumulate and cannot be cleared out Created: 26/Jan/21  Updated: 29/Oct/23  Resolved: 24/Mar/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.18, 5.0.0-rc0, 4.0.28, 4.4.10

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: Sharding-NYC, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-40441 Arbiter nodes log error messages when... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05
Participants:
Case:

 Description   

We allow the creation of logical sessions on arbiters. These sessions are distinct from sessions on the rest of the replica set or sharded cluster; they are strictly local.

However, the logical session reaper does not work on arbiters. Since SERVER-40441, it is disabled explicitly. Before that, it would fail because config.system.sessions does not exist on arbiters (and even if you created it, it wouldn't be sharded on a sharded cluster). This results in eventually running out of space in the session cache, if any are being created.



 Comments   
Comment by Githook User [ 07/Oct/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-54064 Clear out the logical session cache on refresh in arbiters
Branch: v4.0
https://github.com/mongodb/mongo/commit/b59d2547c281c42e61b52d44291d500f4dad21e4

Comment by Githook User [ 06/Oct/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-54064 Clear out the logical session cache on refresh in arbiters
Branch: v4.2
https://github.com/mongodb/mongo/commit/27a601deb8174aac0576a615fc6c4e3af3bfc932

Comment by Githook User [ 06/Oct/21 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-54064: Periodically clear out the logical session cache on arbiters.

(cherry picked from commit 8b64da4e43b7318a7ab8a7580708195b6de91200)
Branch: v4.4
https://github.com/mongodb/mongo/commit/28f46cb15f2ff5bbbd22b45006789bb3edb71872

Comment by Daniel Gottlieb (Inactive) [ 24/Mar/21 ]

The pushed fix clears out the cache on every logical session cache refresh. This is the same cadence as non-arbiters. So it's still possible to hit errors where an arbiter cannot create a new session, but the state will correct itself given enough time.

AFAIK an alternative would have been for arbiters to not insert sessions into the cache at all, but it wasn't clear to me if that would have a more adverse affect than sessions disappearing from arbiters less often.

Comment by Githook User [ 24/Mar/21 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-54064: Periodically clear out the logical session cache on arbiters.
Branch: master
https://github.com/mongodb/mongo/commit/8b64da4e43b7318a7ab8a7580708195b6de91200

Generated at Thu Feb 08 05:32:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.