Unbalanced data repartition between shard

I don’t know what’s happening exactly with the mergeChunks command. It could also be something that has been fixed in later versions. I would recommend to upgrade if possible.

Regarding the issue with the empty / almost empty chunks. The only way to solve the problem is to merge them so the balancer could balance non-empty chunks correctly.

When you massively delete data & it changes dramatically the way your data is split across the chunks, you need to consider running a few mergeChunks commands to regroup the newly empty chunks.

There is no other way to solve this issue without completely redesigning the shard key and the way the documents are organised & stored in the cluster.

Cheers,
Maxime.