[SERVER-73606] Remove task executor from TMAB registry Created: 03/Feb/23  Updated: 14/Nov/23

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

Type: Task Priority: Major - P3
Reporter: Didier Nadeau Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Sprint: Server Serverless 2023-03-06, Server Serverless 2023-03-20
Participants:

 Description   

The Tenant Migration Access Blocker has an executor so callers might wait on access blockers using this executor. It was added to the registry last year as the previous method had deadlock issues. However it added unintended dependencies on numerous modules as including the registry now includes the executor/network stack. As the registry is included by the service context (registry is a decoration on top of the service context) it added a network/executor dependencies in a lot of locations. We want to refactor it to remove this dependency.



 Comments   
Comment by Didier Nadeau [ 20/Mar/23 ]

Sending this to the backlog as the solution is not as simple as first thought and I don't have time to work on this at the moment.

Comment by Didier Nadeau [ 17/Feb/23 ]

Some additional information :

  • The dependency of service_context on the executor/network module already existed before this commit . The access blockers had a `shared_ptr` to an executor which meant service_context had to be linked against the executor/network module (tenant blocker registry depends on access blockers implementation which depends on executor/network)
  • The change does make unit testing more complex as the executor is always constructed and destroyed whenever the `ServiceContext`'s `TenantMigrationAccessBlockerRegistry` decoration is constructed and destroyed. If the environment is not properly setup the test will fail.
  • Completely removing the dependency of MTAB registry on executor/network is not trivial as it would require to refactor a number of method to remove executor usage and move it elsewhere (most likely in tenant_migration_access_blocker_util.cpp).
Generated at Thu Feb 08 06:25:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.