devmadhuu opened a new pull request, #10101:
URL: https://github.com/apache/ozone/pull/10101
## What changes were proposed in this pull request?
This PR fixes incorrect datanode replica details returned by Recon for
unhealthy containers by switching the unhealthy-container `replicas[] `response
from Recon’s truncated replica history to SCM’s current replica set. The
response still enriches SCM replicas with Recon history metadata like
first-seen and last-seen timestamps when available, but SCM is now the source
of truth for replica membership.
The change adds a new
S`torageContainerServiceProvider.getContainerReplicas(...)` API, updates
`ContainerEndpoint` to use it for unhealthy containers, and rewrites the
affected Recon endpoint tests to validate SCM-backed behavior.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15051
## How was this patch tested?
- Updated `TestContainerEndpoint` to validate the new unhealthy-container
behavior against SCM-backed replica responses instead of Recon-local replica
history.
- Added/adjusted assertions to cover:
- over-replicated containers returning all current SCM replicas
- under-replicated and mis-replicated containers returning SCM replica
state/details
- replica-mismatch containers preserving checksum validation with
SCM-backed replicas
- missing containers in /containers/unhealthy returning empty
replicas[] when SCM has no current replicas
--
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]