-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Querying
-
Fully Compatible
-
ALL
-
8
This test assumes that a createIndex command that created an index always returns a response with numIndexesAfter equals to numIndexesBefore + 1. This assumption is not true when the command is run on a mongos which retries on stale shard version errors. For example, in the case where there are two shards, the command can fail with StaleConfig on one of the shards but succeed on the other shard on the first try. The command will succeed on the second try after a refresh but the response from the shard that has already built the index on the first try will have numIndexesAfter equals to numIndexesBefore.