[SERVER-73189] Change DbClient runCommandWithTarget to take in a DatabaseName object Created: 23/Jan/23  Updated: 29/Oct/23  Resolved: 01/Mar/23

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

Type: Task Priority: Major - P3
Reporter: Sophia Tan Assignee: Sophia Tan
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-70433 Change DBClient functions to use Data... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-02-20, Server Serverless 2023-03-06
Participants:
Linked BF Score: 49
Story Points: 3

 Description   

In this ticket, we will do the following things:

  • Change the DbClient runCommandWithTarget to take in DatabaseName object.
  • In runCommandWithTarget function, we should create opMsgRquest with "$tenant" if our project feature flag is enabled.
  • Refactor the DbClient functions which have "appendDollarTenant" as parameter. This parameter is used by bench run to indicate db client should always append "$tenant" without caring our project's feature flag.


 Comments   
Comment by Githook User [ 28/Feb/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-73189 Change DbClient runCommandWithTarget to take in a DatabaseName object
Branch: master
https://github.com/mongodb/mongo/commit/efa000d47b895e15ef03edc7b8888e6a139525dc

Comment by Githook User [ 23/Feb/23 ]

Author:

{'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}

Message: Revert "SERVER-73189 Change DbClient runCommandWithTarget to take in a DatabaseName object"

This reverts commit 26ab9caac209c31ab6b51a71e241699e12875833.
Branch: master
https://github.com/mongodb/mongo/commit/d0a2fb82f0560050a8023e8276ac3d5253206d36

Comment by Githook User [ 23/Feb/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-73189 Change DbClient runCommandWithTarget to take in a DatabaseName object
Branch: master
https://github.com/mongodb/mongo/commit/26ab9caac209c31ab6b51a71e241699e12875833

Comment by Fausto Leyva (Inactive) [ 27/Jan/23 ]

FYI, I added a one-line todo for this ticket here:
https://github.com/mongodb/mongo/blob/ffd636b1f009b826725f8c30ed8834e285f6d0e3/src/mongo/db/commands/write_commands.cpp#L1189-L1191 

Context: I manually added the tenant ID to the aggregation request in order to avoid failures in the 'native_tenant_data_isolation_with_security_token_jscore_passthrough' suite. Namely [this assertion].

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