[SERVER-67934] ServiceStateMachine does correctly bind Client to threads Created: 09/Jul/22  Updated: 27/Oct/23  Resolved: 11/Jul/22

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

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Backlog - Service Architecture
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

I don’t believe the current SSM is correct in borrowed thread model. We use _clientStrand->run to start the WorkItem’s loop iteration, but this is only one callback on the executor, and it will cause a chain of subsequent callbacks until the WorkItem is completed. These will all use the same executor but they will not use the same thread. This needs to be fixed. We should be using _clientStrand->makeExecutor to create an executor on which all tasks are automatically executed while bound to that ClientStrand. A tweak to ServiceExecutorContext will be necessary because ClientStrand::makeExecutor takes a shared_ptr, not raw pointer.


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