[SERVER-66561] Change BasicCommandWithReplyBuilderInterface to use DatabaseName Created: 18/May/22  Updated: 29/Oct/23  Resolved: 07/Jul/22

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

Type: Task Priority: Major - P3
Reporter: Sophia Tan Assignee: Fernando Lisboa (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-67356 Change BasicCommandWithReplyBuilderIn... Closed
is duplicated by SERVER-67397 Change BasicCommandWithReplyBuilderIn... Closed
Related
related to SERVER-67842 Complete TODO listed in SERVER-66561 Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-07-11
Participants:

 Description   

Change the BasicCommandReplyBuilderInterface::invocation class to hold a DatabaseName object instead of a string for the db name. When constructing the db name member, we can grab the validated tenant from the OpMsg. Also change the following functions to take in DatabaseName rather than string as well -

  • BasicCommandReplyBuilderInterface::runWithReplyBuilder
  • BasicCommandReplyBuilderInterface::runAsync
  • BasicCommandWithRequestParser::runWithReplyBuilder
  • BasicCommand::runWithReplyBuilder

BasicCommandWithRequestParser::runWithReplyBuilder and BasicCommand::runWithReplyBuilder call other run() functions that take in a db name as a string - we'll change these in future tickets, so for now can just pass DatabaseName::toStringWithTenantId() to them.

We'll need to change the overridden runWithReplyBuilder() functions for any commands that inherit directly from BasicCommandReplyBuilderInterface - the HelloCmd and ClusterHelloCmd should be the only two.



 Comments   
Comment by Githook User [ 07/Jul/22 ]

Author:

{'name': 'Fernando Lisboa', 'email': 'fernando.lisboa@mongodb.com', 'username': 'fernandolis10'}

Message: SERVER-66561: Change BasicCommandWithReplyBuilderInterface to use DatabaseName
Branch: master
https://github.com/mongodb/mongo/commit/e756e14a6679b3a97b5f7438f984d5b40736d1e8

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