[SERVER-62780] Create tenantId decoration on opCtx for use by background threads Created: 20/Jan/22  Updated: 26/Apr/22  Resolved: 26/Apr/22

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

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Hugh Tong (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-62393 Apply CRUD ops using correct tenant n... Closed
Participants:

 Description   

Background threads that create operation contexts and do work on behalf of tenants will need to set the tenantId on the opCtx they create. Create a new tenantId decoration on the opCtx, similar to dollarTenantDecoration, for use by by such threads. This decoration should only be able to be set when multitenancySupport is enabled, and neither dollarTenantDecoration nor securityTokenDecoration are set (see parseDollarTenantFromRequest for how we can check for multitenancySupport and the securityTokenDecoration) .

getActiveTenant should return the tenantId on this object if it exists.


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