Current container replication handler compare the reported containers with the previous report. It handles over an under replicated state.
But there is no logic to check the cluster-wide replication count. If a node is went down it won't be detected.
For the sake of simplicity I would add this check to the ContainerReportHandler (as of now). So all the reported container should have enough replicas.
We can check the performance implication with genesis, but as a first implementation I think it could be good enough.
----- After Jira discussion below, the final patch does the following: -----
When a dead node is reported, the DeadNodeHandler checks the replication state for all the containers in that node and fires replication events in case of under/over-replicated blocks.