ChenSammi commented on PR #5293:
URL: https://github.com/apache/ozone/pull/5293#issuecomment-1725003213
> My other point is that, I think, there are other opportunities for
containers to end up missing block deletes with offline replicas, maintenance
replicas, over replication, under replication and balancing.
@sodonnel , I think the original goal of this task when submitted by
@lokeshj1703 , is to alleviate the SCM memory pressure posed by two in memory
map **transactionToDNsCommitMap** and **transactionToRetryCountMap** due to
this missing 3rd replica case causing the related block deletion transaction
cannot be finished in a long time. It doesn't aim to solve possible missing
block deletes due to various reasons. So what you mentioned is valid, but from
another angel, and is beyond the current scope of this ticket.
Anyway, if it can solve extra problems in one patch without too much
changes, then I think it's good to go. One improvement we can have is leverage
the replicationManager.getContainerReplicationHealth you mentioned, like this
```
private Boolean checkInadequateReplica(Set<ContainerReplica> replicas,
ContainerInfo container) throws ContainerNotFoundException {
ContainerHealthResult result =
replicationManager.getContainerReplicationHealth(container,
replicas);
if (result.getHealthState() ==
ContainerHealthResult.HealthState.HEALTHY) {
return true;
}
return false;
}
```
Then it will cover not only under-replicated containers, but also
over-replicated and mis-replicated containers. For other cases you mentioned,
they can be addressed with follow up JIRAs and new patches. What do you think?
BTW, you mentioned the maintenance replicas, how will it cause block not
deleted?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]