SERVER-127293 Handle "cu" opType in _parseAreOpsCrudOnly (#54165)

GitOrigin-RevId: 2e94ccddb4a1eeaa75eea459829bfafee639f185
This commit is contained in:
Parker Felix 2026-05-22 11:07:23 -04:00 committed by MongoDB Bot
parent 0076cca5e1
commit d059c87f87
2 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,8 @@ bool _parseAreOpsCrudOnly(const BSONObj& applyOpCmd) {
continue;
} else if (opType == "u"_sd) {
continue;
} else if (opType == "cu"_sd) {
continue;
} else if (opType == "n"_sd) {
continue;
} else {

View File

@ -51,6 +51,9 @@ TEST(ApplyOpsCommandInfoTest, TestParseAreOpsCrudOnlySingleOps) {
const BSONObj updateOp = BSON("applyOps" << BSON_ARRAY(BSON("op" << "u")));
ASSERT_TRUE(_parseAreOpsCrudOnly(updateOp));
const BSONObj containerUpdateOp = BSON("applyOps" << BSON_ARRAY(BSON("op" << "cu")));
ASSERT_TRUE(_parseAreOpsCrudOnly(containerUpdateOp));
const BSONObj noop = BSON("applyOps" << BSON_ARRAY(BSON("op" << "n")));
ASSERT_TRUE(_parseAreOpsCrudOnly(noop));