BugZero found this defect 32 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/17/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
Problem 1: We can execute a very large query successfully, even though its explain fails with BSONObjectTooLarge Problem 2: A very large query might succeed or fail sporadically because of the following LOGV2_WARNING call in find_cmd.cpp requiring the explain output (which exceeds 16MB): try { numResults = batchedExecute(batchSize, exec.get(), firstBatch, docUnitsReturned); } catch (DBException& exception) { firstBatch.abandon(); auto&& explainer = exec->getPlanExplainer(); auto&& [stats, _] = explainer.getWinningPlanStats(ExplainOptions::Verbosity::kExecStats); LOGV2_WARNING(23798, "Plan executor error during find command", "error"_attr = exception.toStatus(), "stats"_attr = redact(stats), "cmd"_attr = cmdObj); exception.addContext(str::stream() << "Executor error during find command: " << nss.toStringForErrorMsg()); throw; } It is unlikely that customers will be running so large queries (therefore priority = minor), but it is still an inconsistency. Possible solutions could be: allow explain output exceed 16MB fail large queries early and consistently if their explain output is above 16MB