how can we set threshold so that after that we dumb the whole data of shard to replica set in mongoDB?

Please tell me some suggestions