-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Service Arch
-
Fully Compatible
-
v8.0
-
Programmability 2024-05-27
For example, we check if the received command is hello as part of parsing every single database command, and that's done by comparing the command's name:
... const auto session = _execContext.getOpCtx()->getClient()->session(); if (session) { if (!opCtx->isExhaust() || !isHello()) { InExhaustHello::get(session.get())->setInExhaust(false, request.getCommandName()); } } ... bool isHello() const { return _execContext.getCommand()->getName() == "hello"_sd || _execContext.getCommand()->getName() == "isMaster"_sd; }
We should use the command's virtual address to perform this comparison.