[
https://issues.apache.org/jira/browse/HDDS-17914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151522#comment-18151522
]
Devesh Kumar Singh commented on HDDS-17914:
-------------------------------------------
Decision: implement this together with P22 (HDDS-16678), for RATIS and EC in
one change.
The counter itself is simple. It goes in BlockManagerImpl#allocateBlock, and it
increments once per block after the fallback getContainer call returns a
container. It is exported as
scm_pipeline_metrics_tier_placement_fallbacks{requestedtier,fallbacktier}, next
to HDDS-17820's failure counter.
The problem is EC. WritableECContainerProvider does not place by storage tier
yet (// TODO StoragePolicy Support EC), and HDDS-16678 removes that TODO. Until
it lands, an EC block that "falls back" is not actually placed on the fallback
tier. A counter for EC would then report a tier that was never used.
considered two options:
- Ship RATIS now and skip EC. This needs a temporary check, and nothing would
remind us to remove it. EC would be missed.
- Wait for HDDS-16678 and do both together. There is no temporary code, and
the EC numbers are correct from day one. I am choosing this one.
To make sure EC is not forgotten, it is tracked as a follow-up for the
HDDS-16678 change: count EC fallbacks with no replication-type check, test the
EC cases, and check that the result agrees with HDDS-17819's outcome=fallback
for EC keys.
Nothing else in the scope changes. The audit log fields stay as they are, and
the rules for which errors may fall back stay with HDDS-17535.
Depends on: HDDS-17820 (#12079) and HDDS-16678.
> 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
> Priority: Major
>
> 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]