[SERVER-81009] VTS not available on opCtx for Distinct transactions Created: 12/Sep/23  Updated: 30/Jan/24  Resolved: 24/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Joseph Prince
Resolution: Fixed Votes: 0
Labels: auto-reverted, ntdi_code_quality, ntdi_must_have
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-81787 Add support for ValidatedTenancyScope... Closed
is depended on by SERVER-85479 Make UMCTransaction to build OpMsgReq... In Code Review
Problem/Incident
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2024-02-05
Participants:
Linked BF Score: 158
Story Points: 4

 Description   

The ValidatedTenancyScope is not available on the opCtx in the Distinct command specifically for transactions.  It's possible this is due to transactions operating on a separate thread, but this may need additional investigating.  Unfortunately, the distinct command is derived from BasicCommand, which means we cannot access the original OpMsgRequest for the VTS, which is needed to build the DistinctCommandRequest IDL structured request.

This is first discovered failing one of two identical distinct commands in the view_reads_in_transactions.js test, one within a transaction and one outside of a transaction.  This applies to the native_tenant_data_isolation_with_security_token_jscore_passthrough as the VTS reflects the state of the security token.



 Comments   
Comment by Githook User [ 24/Jan/24 ]

Author:

{'name': 'Joseph Prince', 'email': '57415450+josephdprince@users.noreply.github.com', 'username': 'josephdprince'}

Message: SERVER-81009 Add ValidatedTenancyScopeGuard to stash vts and tenant protocol on DBDirectClient (#18288)

GitOrigin-RevId: e2d8cbe21685e89a2b0e7dce7881463d248dfccb
Branch: master
https://github.com/mongodb/mongo/commit/537a4565378f692b2f5dee7a8fe84a1d1ccaf514

Comment by Githook User [ 23/Jan/24 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-81009 Add ValidatedTenancyScopeGuard to stash vts and tenant protocol on dbdirectclient (#18243)"

This reverts commit 5397b75f4de806b5f5009bd6c850e084cfeab8e0.

GitOrigin-RevId: 14a99b7dd6a19a0ed0cabef9632ec7654bbf897f
Branch: master
https://github.com/mongodb/mongo/commit/65f3f854e85d489a2fcb3d8e4bcbc2e4dea833ba

Comment by Githook User [ 23/Jan/24 ]

Author:

{'name': 'Joseph Prince', 'email': '57415450+josephdprince@users.noreply.github.com', 'username': 'josephdprince'}

Message: SERVER-81009 Add ValidatedTenancyScopeGuard to stash vts and tenant protocol on dbdirectclient (#18243)

GitOrigin-RevId: 5397b75f4de806b5f5009bd6c850e084cfeab8e0
Branch: master
https://github.com/mongodb/mongo/commit/8c2c3fc0f953577d98de6d79fb5075a72b6a44c9

Comment by Sophia Tan [ 22/Sep/23 ]

After talking with Hugh, we decide to defer this ticket and wait for the new design proposal about putting the VTS in OpCtx and passing VTS to another OpCtx gets approved. 

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