[SERVER-68546] SessionWorkflow: upgrade WorkItem to a class with invariants and behavior enforcement Created: 03/Aug/22  Updated: 29/Oct/23  Resolved: 09/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement 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:
Issue split
split from SERVER-68449 Introduce SessionWorkflow::WorkItem Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-08-08, Service Arch 2022-08-22
Participants:

 Description   

In SessionWorkflow (nee ServiceStateMachine), there's some cursor cleanup to do when a session ends, if that session in processing an exhaust command. This state of being "in exhaust" is currently a bool in WorkItem, but it could be an object that is shared among the WorkItems participating in the exhaust sequence. The end of the lifetime of that object would naturally correspond to the time at which the cursor cleanup should occur.



 Comments   
Comment by Githook User [ 08/Aug/22 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-68546 WorkItem accessors
Branch: master
https://github.com/mongodb/mongo/commit/03632db1b43e002bba636b2c9e4d9d3396a87073

Comment by Billy Donahue [ 04/Aug/22 ]

The `ExhaustResources` behavioral RAII object idea in this original ticket description was not the best approach.
Packaging up the WorkItem struct as a class make the simplicity easier to see, so we'll do that.

Generated at Thu Feb 08 06:11:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.