[SERVER-58893] Internal commands should skip API validation checks Created: 27/Jul/21  Updated: 29/Oct/23  Resolved: 09/Sep/21

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

Type: Task Priority: Major - P3
Reporter: Xuerui Fa Assignee: Adi Zaimi
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-58794 _configsvrCreateDatabase and _flushDa... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2021-08-23, Repl 2021-09-06, Repl 2021-09-20
Participants:

 Description   

In SERVER-58794, we added Command::acceptsAnyApiVersionParameters to two internal commands to skip API validation checks on those commands. We should consider applying that flag to all internal commands, since internal commands should not need to go through API validation. To implement this, we can rename the flag to something along like isInternalCommand() and setting that flag to true for all internal commands.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Adi Zaimi [ 09/Sep/21 ]

Work for this was checked in and reviewed as part of https://github.com/10gen/mongo/pull/460.

Comment by Githook User [ 09/Sep/21 ]

Author:

{'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}

Message: SERVER-58893 more commands to skip api version check
Branch: master
https://github.com/mongodb/mongo/commit/1181ad492b061a582c7873c8ee610b098c9076b8

Comment by Adi Zaimi [ 02/Sep/21 ]

Besides the deprecated commands (those with comment "Can be removed once 6.0 is last LTS"), the following commands do not seem to be Internal (server to server) commands thus I am not adding override:
_hashBSONElement 
_mergeAuthzCollections     
_movePrimary 
_vectorClockPersist (this one I could not find the command cpp)
availableQueryOptions
godinsert
httpClientRequest
makeSnapshot
netstat
pinHistoryReplicated
refreshLogicalSessionCacheNow
reapLogicalSessionCacheNow
sbe
setCommittedSnapshot
stageDebug
startSession
testDeprecation
testDeprecationInVersion2
testRemoval
testReshardCloneCollection
testVersion2
testVersions1And2

I am adding them here do document, as well as for visibility so if there are any which should be added, I can do so.

Comment by Githook User [ 30/Aug/21 ]

Author:

{'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}

Message: SERVER-58893 Rename flag to skipApiVersionCheck
Branch: master
https://github.com/mongodb/mongo/commit/02ea9d07a44abb83d96ca8fe517e18ea6f1ef426

Comment by Adi Zaimi [ 30/Aug/21 ]

After discussion with Moustafa and Xuerui we decided to call the property getter skipApiVersionCheck instead. This is the successful evergreen test run:
https://spruce.mongodb.com/version/6129ca382a60ed23ef718c6e/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

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