-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Labels:
-
Fully Compatible
-
ALL
-
Sharding 2018-12-03, Sharding 2018-12-17
Wrong operator used in expression
Defect 105090 (STATIC_C)
Checker CONSTANT_EXPRESSION_RESULT (subcategory operator_confusion)
File: /src/mongo/db/write_concern.cpp
Function mongo::extractWriteConcern(mongo::OperationContext *, const mongo::BSONObj &)
/src/mongo/db/write_concern.cpp, line: 85
"opCtx->getClient()>session()>getTags() | 2U /* mongo::transport::Session::kInternalClient */" is always 1/true regardless of the values of its operand. This occurs as the logical second operand of "&&".
(opCtx->getClient()->session()->getTags() | transport::Session::kInternalClient)) {