HDDS-15637. Container Replica Debugger Tool improvements and minor bug fixes#10574
Open
sreejasahithi wants to merge 1 commit into
Open
HDDS-15637. Container Replica Debugger Tool improvements and minor bug fixes#10574sreejasahithi wants to merge 1 commit into
sreejasahithi wants to merge 1 commit into
Conversation
Contributor
Author
|
@ashishkumar50 Could you please review this PR. |
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?
Following improvements and minor bug fixes need to be done for the tool:
Proper Database path validation
currently users could pass a non-existent DB file path and fail later with less clear errors and with an empty db file crated in the current working directory.
Skipping invalid log files and make log filename parsing more robust using regex
When a file is skipped because it is not a container log, the process should not get stuck waiting on it. We should do latch.countDown() in such cases to prevent the process to get stuck.
Ensure that only valid container log files are processed and unrelated files present in the directory are ignored.
Health filter query fixes
simplify and improve Over/under-replicated and unhealthy container sql queries.
Rewrite SQL to count replicas correctly:
Under-replicated: healthy replicas (not UNHEALTHY/DELETED) < replication factor
Over-replicated: total active replicas > replication factor, and healthy replicas >= replication factor
Unhealthy: all active replicas are UNHEALTHY
Add per-state replica summary to container analysis
Enhance the info sub-command to display a summary of replica states after container analysis.
Include counts for states such as
CLOSED,QUASI_CLOSED,CLOSING,OPEN,DELETED, andUNHEALTHYto provide a quick overview of replica distribution.Add result limiting support to duplicate-open sub-command
Introduce options to limit the number of results returned by the duplicate-open sub-command.
Provide an option to display all matching results when required.
What is the link to the Apache JIRA
HDDS-15637
How was this patch tested?
Green CI : https://github.com/sreejasahithi/ozone/actions/runs/27936681974