HDDS-14927. Add Quasi-Closed Container Tracking in Recon.#10198
Draft
ArafatKhan2198 wants to merge 2 commits intoapache:masterfrom
Draft
HDDS-14927. Add Quasi-Closed Container Tracking in Recon.#10198ArafatKhan2198 wants to merge 2 commits intoapache:masterfrom
ArafatKhan2198 wants to merge 2 commits intoapache:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Please describe your PR in detail: What changes are proposed in the PR? and Why? This PR introduces a new feature in Apache Ozone Recon to track and display containers that are in the
QUASI_CLOSEDlifecycle state.A container enters the
QUASI_CLOSEDstate when it is locally closed by a DataNode (often due to a pipeline failure or interruption) but SCM has not yet finalized it asCLOSEDdue to a lack of quorum. While these containers may not always trigger existing unhealthy replication alerts (like missing or under-replicated), they are critical for debugging because a container stuck inQUASI_CLOSEDfor an extended period indicates a stalled pipeline finalization or lifecycle issue.Previously, Recon only tracked replication health issues. This PR adds a dedicated, in-memory tracking path for
QUASI_CLOSEDcontainers, separating lifecycle state tracking from replication health tracking.Approach used to solve the issue: To ensure minimal overhead and avoid unnecessary database writes, this feature is implemented entirely in-memory without introducing new Derby DB tables or background persistence tasks:
ContainerEndpoint.java): Added a newGET /api/v1/containers/quasiClosedendpoint. This endpoint utilizes cursor-based pagination and fetchesQUASI_CLOSEDcontainers directly from the in-memoryReconContainerManager(ContainerStateMap), which is an efficientO(limit)lookup.QuasiClosedContainersResponse.java): Created a lightweight response object that maps the in-memoryContainerInfotoUnhealthyContainerMetadata, allowing seamless integration with the existing frontend components.ContainerTablecomponent, adds the quasi-closed count to the Highlights card, and overrides the column title to display "State Enter Time".What is the link to the Apache JIRA
How was this patch tested?