175 — QueryPlanKilled

sharding

The shard's cached chunk version is stale

What is happening?

StaleShardVersion is returned when a shard receives a request with chunk routing metadata that does not match its current state. This occurs after chunk migrations, splits, or merges when the routing tables are being refreshed. The driver or mongos normally retries transparently after updating its routing cache.

Common causes

  1. Chunk migration just completed on the target shard
  2. Balancer actively splitting or merging chunks
  3. mongos routing cache not yet refreshed after a topology change
  4. Multiple concurrent migrations affecting the same collection

Diagnostic Steps

Related Issues