Devesh Kumar Singh created HDDS-17914:
-----------------------------------------
Summary: Add SCM metric for successful storage-tier fallback
allocations by requested and fallback tier
Key: HDDS-17914
URL: https://issues.apache.org/jira/browse/HDDS-17914
Project: Apache Ozone
Issue Type: Task
Reporter: Devesh Kumar Singh
Assignee: Devesh Kumar Singh
Problem
A bucket can allow fallback. When SCM cannot allocate a block on the policy's
creation tier, it then allocates the block on the fallback tier. The write
succeeds and the user sees no error. The data sits on a tier the policy did not
ask for.
Today this event appears only in the SCM audit log, as fallbackBlockCount and
sampleIsFallBack, in SCMBlockProtocolServer#allocateBlock. No metric counts it,
so operators cannot see the fallback rate on a dashboard or alert on it. They
find these blocks only by running ozone admin storagepolicy check on keys.
This was deferred earlier:
https://github.com/apache/ozone/pull/10946#discussion_r3777472649. It was
raised again in review:
https://github.com/apache/ozone/pull/12079#pullrequestreview-6034647212.
*Proposal*
Add a counter to SCMPipelineMetrics, next to the tier placement failure counter
from HDDS-17820:
scm_pipeline_metrics_tier_placement_fallbacks{requestedtier="SSD",fallbacktier="DISK"}
- Count one per block, and only after the fallback allocation succeeds. Do not
count when the fallback attempt also fails; HDDS-17820 already counts that
failure.
- Labels:
- requestedtier comes from StoragePolicy#getCreationTier().
- fallbacktier comes from StoragePolicy#getCreationFallbackTier().
- Both use StorageTier names. A null or EMPTY tier is reported as UNKNOWN.
- Create the series up front, with zero values, so dashboards show 0 rather
than "no data".
- Keep the audit log fields as they are.
Where
- BlockManagerImpl#allocateBlock: the fallback branch. Increment when
containerInfo != null && isFallBack.
- Alternatively, increment in SCMBlockProtocolServer#allocateBlock, where
block.isFallBack() is already counted for the audit.
Notes
- Today only HOT has a fallback tier (SSD to DISK). WARM and COLD have EMPTY,
so they never fall back; their failures are counted by HDDS-17820.
- EC: WritableECContainerProvider does not yet place by tier (P22 /
HDDS-16678). Until that lands, the fallback tier label for EC is not reliable.
Either limit the counter to RATIS for now, or document this limitation.
- Out of scope: deciding which errors may fall back (the TODO in
BlockManagerImpl#allocateBlock). That belongs to HDDS-17535.
Related
- HDDS-17819: OM committed bytes with outcome=fallback. That counts committed
bytes per key; this JIRA counts SCM block allocations.
- HDDS-17820: tier placement failures.
Tests
- HOT with SSD full and fallback allowed: the counter for SSD/DISK goes up by 1
for each block.
- SSD succeeds: no increment.
- Fallback attempt also fails: no increment; the HDDS-17820 failure counter
goes up instead.
- Fallback not allowed: no increment.
- A multi-block call with mixed results counts only the fallback blocks.
- Series are exported with zero values before any fallback happens.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]