I'm using Mongo's Update functionality to flip a simple flag from 25 records matching a specific criteria. The database contains 50 million records.
Matching criteria:
{ 'profile_merge.success': false, 'profile_merge.http_status': 500 }
Update statement:
{
"$set":{
"profile_merge.processed":false
}
}
This fails with the message: "error while multiplanner was selecting best plan :: caused by :: operation exceeded time limit" (see screenshot attached). The message appears immediately, so it does not seem to be hitting any time limit.
I'm using Mongo's Update functionality to flip a simple flag from 25 records matching a specific criteria. The database contains 50 million records.
Matching criteria:
{ 'profile_merge.success': false, 'profile_merge.http_status': 500 }
Update statement:
{
"$set":{
"profile_merge.processed":false
}
}
This fails with the message: "error while multiplanner was selecting best plan :: caused by :: operation exceeded time limit" (see screenshot attached). The message appears immediately, so it does not seem to be hitting any time limit.
The error comes from the multiplanner - the query planner on the serverside (mongodb) not clinetside (compass).
Query planner has very tight deadline counted in milliseconds - for your eyes it would seem immediate, but there was a lot of drama happened on the server during this fraction of a second. The query planner got all possible combinations of query optimisation, ran all of them for a short time, calculated how many results each plan returned to pick the best one.
The error spells that all plans failed to return at least 1 result, and the engine refused to run the query.
mongosh
? – Wernfried Domscheit Commented Jan 16 at 13:22