Operational Defect Database

BugZero found this defect 32 days ago.

MongoDB | 2645928

A very-large query might fail sporadically with BSONObjectTooLarge

Last update date:

4/17/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...