|
So after investigating this bug, I was able to figure out that the problem is that the explain method creates a request that gets routed to the same shard server, which results in the explain method being called again in an infinite loop.
In our slack conversations discussing this bug, Cheahuychou said there were two ways to fix this:
- Remove the "cluster" prefix before forwarding the explain command to shards. So shards receive just the "insert"/"update"/"delete".
- Not support the explain version of the cluster commands that got linked in mongods (i..e add uasserts at the start of the commands)
We (Cheahuychou, Andrew Witten and I) decided that the best option would be #2 as cluster commands (such as clusterDelete) are only used internally, and so an explain on them doesn't make sense.
|