Repository navigation
Conversation
…quested storage type and reason.
Contributor
Author
|
@anuragp010 Another PR for SCM tiering allocation metrics. Kindly have a look. |
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?
SCM currently logs tier-placement failures but does not expose counters showing why allocation on
SSD, DISK or ARCHIVEfailed. A write can succeed through fallback, leaving administrators without metrics explaining why the preferred tier could not be used.This PR adds the following counter to
SCMPipelineMetricsfor RATIS/standalone allocation:scm_pipeline_metrics_tier_placement_failures{requestedtier="SSD",reason="no_space"}The counter uses bounded labels:
Reasons are classified using existing SCM result codes:
- no_space: insufficient eligible storage of the requested type. This includes space/type eligibility failures and does not necessarily mean the physical disks are full. - no_suitable_node: insufficient healthy/suitable nodes or placement restrictions such as pipeline limits. - other: unclassified failures, including ordinary I/O errors and readiness timeouts.A failure is counted once after allocation on that tier exhausts the existing retries. Successful recovery on the same tier does not increment the counter.
For example, suppose ten HOT block allocations prefer
SSD. Six succeed onSSD, three fail its space/type check, and one fails suitable-node selection. If all four unsuccessfulSSDallocations succeed through DISK fallback, administrators see:These counters measure failed tier allocations, rather than failed keys or bytes. They reset with SCM metrics registration. All tier/reason combinations are exported, including zeros.
Existing aggregate metrics, allocation decisions, retry behavior, exception messages and fallback rules remain unchanged. EC related tier allocation metrics will be done in follow up PR.
What is the link to the Apache JIRA?
HDDS-17820 (https://issues.apache.org/jira/browse/HDDS-17820)
How was this patch tested?
TestSCMTierPlacementMetricsfor reason classification, tier separation, UNKNOWN handling, Prometheus output, concurrent updates and registration/reset behavior.TestWritableRatisContainerProviderto verify terminal failure counting, successful recovery, readiness failures and unchanged exceptions.TestBlockManagerto verify permitted/disabled fallback and separate accounting when both preferred and fallback tiers fail.