After upgrading sharded cluster (shard key {uid:1}) from 2.4.9 to 2.6.5 I've began to notice periodic and sudden significant performance drops caused by huge read queue and lock on different shards. Logs shows slow queries like this:
<skpd> query mpfs.hidden_data query: { _id: "5120d6d1c7624f319c35fdff9e596890", uid: "230984277" } planSummary: IXSCAN { uid: 1.0 } ntoskip:0 nscanned:28184 nscannedObjects:28184 keyUpdates:0 numYields:220 locks(micros) r:797191 nreturned:1 reslen:374 7134ms
This collection has indexes {uid: 1} and {_id: 1}, and in normal situation, queries like that uses "_id" index that is the fastest one.
This problem seems to be very similar to SERVER-13675 but it's marked as fixed in 2.6.2.
- is duplicated by
-
SERVER-16350 Wrong index choice when request contains _id in query + sort command
- Closed
- related to
-
SERVER-1599 support ability to pass hint to update
- Closed