The range-deleter is deleting orphaned documents by scanning an index compatible with the shard key.
When no index on the shard key is found on a shard trying to perform orphans deletion, the range-deleter starts to spam the logs aggressively and indefinitely with the "Unable to find shard key index" error; this results in a relevant increase on the log file size up to some GBs per hour.
Purpose of this ticket is to:
- Throttle the logging of the problem (e.g. by simply introducing a sleep of X seconds in case the shard key index is not found)
- Change the returned error code from InternalError to the more meaningful IndexNotFound code.