Hey there,
We've been dealing with this problem for a long time and don't know a way around it. We have a somewhat high traffic database with notablescan turned on. Sometimes an index won't get there in time, or there's a flat out programming mistake and it throws an error. This is all well and good and the desired behavior.
The problem we have is that other clients connected to the database get the same error. Here's the rough sequence of events that just happened to me:
- ssh into machine, run queries using mongo CLI. Accidentally trigger a tablescan error. Mongo throws an error.
- A minute later, on a different machine, a cron job starts, fires a query (ensureIndex, IIRC) against a different database and gets the same error.
To reiterate, the script tries to ensure an index on a different database from a different mongos instance, but gets the same error back, crashing the process.
Yes, I can catch this error and retry the operation, and that's generally the approach we've taken, but this behavior seems rather ridiculous. Is there a way to stop this from happening? I'd really rather not get errors that come from a completely different session and process.
Any help would be greatly appreciated.
Keith.