[SERVER-34179] fix the isGenericArgument physical design Created: 28/Mar/18  Updated: 29/Oct/23  Resolved: 03/Apr/18

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

Type: Improvement Priority: Minor - P4
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 2018-04-09
Participants:

 Description   

CommandHelpers::isGenericArgument is currently inline in commands.h.

Moving its definition to commands.cpp reveals that it was being called by other libraries that did not and could not declare the db/commands library in their LIBDEPS. Adding it to their LIBDEPS creates a cycle. We shouldn't tolerate such hidden library cycles.

isGenericArgument doesn't actually depend on anything. It's just a lookup in a whitelist of strings. It's reasonable to just make a library to collect these classification predicates that identify passthrough arguments and generic arguments. This library is lower level than the dispatching, properties, parsing, and behaviors of specific executable Command that are the responsibility of the more complex db/command library.



 Comments   
Comment by Githook User [ 03/Apr/18 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}

Message: SERVER-34179 refactor isGenericArgument

Remove the static tables floating around at namespace scope.

break CommandHelpers::isGenericArgument into
command_generic_argument library so it doesn't have to be inline.
Some callers depend on it but would have a circularity if they
actually added db/commands to their LIBDEPS.
Branch: master
https://github.com/mongodb/mongo/commit/a16f90edd5339d3f58bec24e2a1639c0b2fd938e

Comment by Billy Donahue [ 28/Mar/18 ]

https://mongodbcr.appspot.com/191790002/

Generated at Thu Feb 08 04:35:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.