-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Labels:None
-
Minor Change
-
ALL
-
Repl 2021-02-22
I think there's a bug in cluster_collection_mod_cmd.cpp:
void validateResult(const BSONObj& resultObj) final { auto ctx = IDLParserErrorContext("CollModReply"); StringDataSet ignorableFields( {kWriteConcernErrorFieldName, ErrorReply::kOkFieldName, kTopologyVersionFieldName}); if (!checkIsErrorStatus(resultObj, ctx)) { if (resultObj.hasField(kRawFieldName)) { const auto& rawData = resultObj[kRawFieldName]; if (ctx.checkAndAssertType(rawData, Object)) { for (const auto& element : rawData.Obj()) { const auto& shardReply = element.Obj(); if (!checkIsErrorStatus(shardReply, ctx)) { auto reply = Reply::parse(ctx, shardReply.removeFields(ignorableFields)); coll_mod_reply_validation::validateReply(reply); } } } } else { auto reply = Reply::parse(ctx, resultObj.removeFields(ignorableFields)); coll_mod_reply_validation::validateReply(reply); } } }
That will not call Reply::parse if the reply includes a "raw" field. Thus I think Reply::parse is never called?