[
https://issues.apache.org/jira/browse/HDDS-17535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151883#comment-18151883
]
Aleksei Ieshin edited comment on HDDS-17535 at 11/27/26, 6:57 AM:
------------------------------------------------------------------
[~deveshsingh] Thanks.
It took me quite a while to put this doc together, and it goes a little beyond
the original idea of the contract. :) I'm not sure Jira is the right place for
it, though.
h4. 1. Terms
* *Storage policy of an allocation:* resolved by OM per block allocation
request: {{KeyArgs}} policy -> open key's stored policy -> bucket policy at
request time -> OM default ({{{}ozone.om.default.storage.policy{}}},
{{{}WARM{}}}). The key's policy is stamped at create and new clients send it
back on every {{{}AllocateBlock{}}}, so a bucket policy change during a write
does not move the key's later blocks (HDDS-17374). Each policy has fixed tiers:
||Policy||Preferred tier||Fallback tier||
|{{HOT}}|SSD|DISK|
|{{WARM}}|DISK|{{EMPTY}} (none)|
|{{COLD}}|ARCHIVE|{{EMPTY}} (none)|
* *Preferred tier:* the policy's creation tier, tried first for every new
block. Never {{{}EMPTY{}}}.
* *Fallback tier:* the policy's creation fallback tier. {{EMPTY}} means the
policy has none.
* *Fallback allowed:* the bucket's {{allowFallbackStoragePolicy}} is true (OM
treats unset as true and sends the flag with every allocation) *and* the
policy's fallback tier is not {{{}EMPTY{}}}. With the policies above, only
{{HOT}} can fall back.
* *Strict request:* a request for which fallback is not allowed.
* *Policy-free request:* an SCM request without a storage policy, from an OM
that does not support storage policy. SCM uses its default policy
({{{}WARM{}}}) with fallback disabled, so the block goes to DISK.
* *Tier attempt:* everything the writable container provider does for one
tier: look for an open container, create a pipeline, wait for it, look again.
* *Failure classification:* a tier attempt that returns no container ends with
at most one structured failure, the last {{SCMException}} from pipeline
creation or from waiting for a pipeline. Its result code is classified exactly
as HDDS-17820 classifies it for the failure metric; one shared definition:
||Category||Result codes||
|{{no_space}}|{{{}FAILED_TO_FIND_NODES_WITH_SPACE{}}},
{{FAILED_TO_FIND_CONTAINER_WITH_SPACE}}|
|{{no_suitable_node}}|{{{}FAILED_TO_FIND_HEALTHY_NODES{}}},
{{FAILED_TO_FIND_SUITABLE_NODE}} (includes per-tier pipeline limits),
{{FAILED_TO_FIND_NODE_IN_POOL}}|
|{{other}}|every other result code, and every attempt without a structured
failure|
Attempts without a structured failure include safe mode, SCM HA errors,
internal errors, a pipeline readiness timeout, a pipeline that disappears while
waiting, and a created pipeline that still yields no container.
* *Tier capacity failure:* a tier attempt classified {{no_space}} or
{{{}no_suitable_node{}}}.
h4. 2. Guarantees for writes (RATIS and standalone)
# SCM *must* try the preferred tier first.
# If the preferred-tier attempt succeeds, the block *must* be on the preferred
tier.
# SCM *may* allocate on the fallback tier only when fallback is allowed *and*
the preferred-tier attempt ended in a tier capacity failure. The block goes to
a container of the fallback tier that SCM designates for fallback (today any
open container of that tier; HDDS-17712 narrows it to containers that carry the
intended tier).
# SCM *must not* fall back for an {{other}} failure: safe mode, not-leader,
timeouts, invalid block size, internal errors, a tier that produced a pipeline
but no container, or anything else outside the two categories. That failure is
returned unchanged. Consequence: a slow SSD pipeline creation fails a {{HOT}}
write rather than falling back.
# Fallback is a single attempt on the fallback tier. SCM *must not* try any
third tier.
# A strict request *must* either get a block on the preferred tier or fail. It
*must not* be placed on any other tier.
# When the last tier tried ends in a tier capacity failure (the preferred tier
for a strict request, the fallback tier otherwise), the request *must* fail
with the "tier unavailable" error (section 4), naming the tiers tried. If the
fallback-tier attempt ends in an {{other}} failure, that failure is returned
unchanged.
# A policy-free request *must* behave exactly as today: default policy, DISK,
no fallback, same errors.
# Legacy metadata: pipelines and containers created before the feature have no
stored tier. SCM never selects such a pipeline for a request that carries a
policy, and a block only reaches a container through its pipeline, so legacy
containers are unreachable for tier-aware requests. HDDS-17526 decides what to
do with legacy pipelines after finalization; mapping a null tier to DISK is
compatible with this contract, mapping it to any other tier or to "any tier"
would break guarantee 2.
*Multi-block requests.* OM asks SCM for several blocks in one call. Each block
is allocated independently under the rules above, so blocks of one call may
differ in tier and in {{{}isFallBack{}}}. The first block that fails fails the
whole call; blocks already allocated in that call are discarded.
h4. 3. Reported placement
For every allocated block the caller sees {{AllocatedBlock#getStorageTier}} and
{{{}AllocatedBlock#isFallBack{}}}, carried into OM's {{OmKeyLocationInfo}} and
persisted with the key. Their meaning is fixed because the datanode write and
HDDS-17819 depend on it:
* {{storageTier}} is the tier the block was physically placed on at
allocation. It equals the tier of the pipeline the block was allocated in and
is taken from there, not from the container. For a fallback block it is the
fallback tier. Readers: the client, which sends it to the datanode as the
volume type for container creation, and HDDS-17819's {{actualtier}} label at
commit. It is a write-time snapshot: later moves (HDDS-17712 promotion,
HDDS-17536 repair) do not update it; current placement is per replica in SCM's
container reports.
* A block has no field for the tier it was meant for. That is the key's
policy's preferred tier. {{isFallBack = true}} means the block was not placed
on it at allocation; whether its replicas are there now is answered by SCM's
container reports, not by the block.
* After HDDS-17712, for a fallback container {{ContainerInfo.storageTier}} and
the replica's declared storage type carry the intended tier (SSD), while the
pipeline's tier and the replica's {{volumeStorageType}} carry the physical one
(DISK). That is why the block tier comes from the pipeline.
* {{isFallBack}} is set by SCM in {{{}BlockManagerImpl#allocateBlock{}}}: true
when fallback was allowed, the preferred-tier attempt ended in a tier capacity
failure, and the block was then allocated on the fallback tier. False in every
other case. No other code path sets it; OM and the client only copy it.
* For a policy-bearing request: {{isFallBack = true}} implies {{storageTier}}
is the policy's fallback tier, and {{isFallBack = false}} implies
{{storageTier}} is the policy's preferred tier. Any other combination is a bug.
* For a policy-free request {{isFallBack}} is false and {{storageTier}} is
DISK.
* SCM records {{fallbackBlockCount}} and {{sampleIsFallBack}} in the audit log
for every allocation call.
h4. 4. Errors
*New result code.* A tier capacity failure on the last tier tried is reported
with one new result code, working name {{{}STORAGE_TIER_UNAVAILABLE{}}}.
* SCM: new value in {{SCMException.ResultCodes}} and in {{Status}} of
{{{}ScmServerProtocol.proto{}}}.
* OM: new value in {{OMException.ResultCodes}} and in {{Status}} of
{{{}OmClientProtocol.proto{}}}. OM maps the SCM code to it in
{{{}OMKeyRequest#allocateBlock{}}}, next to the existing mappings for
{{SAFE_MODE_EXCEPTION}} and {{{}PIPELINE_NOT_FOUND{}}}.
* The client's block-allocation retry (HDDS-16712) retries
{{SCM_IN_SAFE_MODE}} and {{{}KEY_ALLOCATION_ERROR{}}}. It must not retry
{{{}STORAGE_TIER_UNAVAILABLE{}}}; the condition is not transient.
* Message: policy, tiers tried, and the reason of the last attempt in
HDDS-17820's words ({{{}no_space{}}} or {{{}no_suitable_node{}}}), so the error
and the metric series match. OM and S3 Gateway pass it through.
* All other failures keep their current result codes.
*S3 Gateway.* A new {{S3ErrorTable}} constant {{{}StorageTierUnavailable{}}},
HTTP 507, and a {{case}} for the OM result code in {{{}translateResultCode{}}}.
Today the failure reaches S3 clients as {{InternalError}} 500: the client
cannot tell a full tier from a broken server, and the gateway logs a stack
trace for every 500. HTTP 507 (RFC 4918, "unable to store the representation")
covers both reasons and AWS SDKs do not retry it, so the caller sees the real
cause at the first attempt. MinIO answers 507 ({{{}XMinioStorageFull{}}}) when
its backend is full. Message: the S3 storage class used, the tiers tried, the
reason.
*Compatibility (ZDU).*
* {{STORAGE_TIER_UNAVAILABLE}} is appended as the last entry of all four
enums, proto number equal to the Java ordinal, since both protocols map result
codes by position. protolock accepts an appended enum value; the regenerated
{{proto.lock}} files ship with the change.
* SCM sends the new code only after the HDDS storage-policy version is
finalized. That version does not exist yet (HDDS-17534); this ticket depends on
it. Before finalization SCM returns today's codes.
* OM sends its new code only after
{{OzoneManagerVersion.STORAGE_POLICY_SUPPORT}} is finalized. Before that it
rethrows the {{SCMException}} and the client gets today's
{{{}INTERNAL_ERROR{}}}.
* Both response messages declare {{required Status status}} (proto2). A
receiver that does not know the value fails to parse the response and the write
fails. An unknown code can never look like a success. This is what protects
external clients on older jars; no {{{}ClientVersion{}}}-based downgrade, as
for OM result codes 97 to 105.
* After OM finalization, when a write fails for tier capacity: a new external
client gets {{{}STORAGE_TIER_UNAVAILABLE{}}}; an old external client gets the
parse failure (OM applies the bucket's policy for it, so a strict {{HOT}}
bucket does produce this); an S3 application gets 507 through an upgraded S3
Gateway. Policy-free requests never receive the new code. Every write that does
not fail for tier capacity is unaffected in every state.
*What the caller sees when allocation fails* (any failure, including "tier
unavailable"): no block from the request reaches the caller; SCM persists no
per-block state, and pipelines or containers created during the attempt remain
open for later allocations. The OM request fails with the error above. A new
key is not created. A key or multipart part already being written fails at its
next block allocation; its earlier blocks stay with the open key until OM's
open-key cleanup deletes them. No partial key is committed.
h4. 5. Observability
This ticket adds no metric. Visibility comes from HDDS-17820 (failed tier
attempts by tier and reason, using the classification in section 1), HDDS-17914
(successful fallback allocations, counting blocks with {{{}isFallBack =
true{}}}) and HDDS-17819 (committed bytes by policy, requested tier, actual
tier and outcome, derived from the section 3 fields). A policy-free key is
reported as {{UNKNOWN}} by HDDS-17819.
h4. 6. Granularity
Fallback is decided per block. Blocks of one key may be on different tiers. The
policy is fixed per key, but {{allowFallbackStoragePolicy}} is read from the
bucket at every allocation, so flipping it during a write changes whether later
blocks may fall back. A bucket policy change does not move existing keys; that
is the migration chain HDDS-17059 and HDDS-17073, whose rewrites go through
{{allocateBlock}} and so follow this contract. Moving fallback data back to the
preferred tier is HDDS-17712 and not part of this contract.
h4. 7. Rules for the other paths
||Path||Rule||Ticket||
|Write, RATIS / standalone|Sections 1 to 6|HDDS-17535 (this)|
|Write, EC|Until EC placement is tier-aware, EC blocks go to the default tier
regardless of the requested policy, never fall back, never return "tier
unavailable", and report {{{}isFallBack = false{}}}. Today the requested tier
reaches the EC provider for new pipelines while existing pipelines are reused
regardless of tier, and the fallback branch applies to EC; this ticket adds the
guard in {{allocateBlock}} that makes the rule hold. Once HDDS-16678 lands, EC
follows sections 1 to 6 unchanged.|HDDS-16678|
|Container Balancer|Never falls back: a move stays within one storage
type|HDDS-16653|
|Disk Balancer|Never falls back: a move stays within one storage
type|HDDS-17725|
|Repair of under-replicated and quasi-closed-stuck RATIS containers|Target
chosen on the container's stored tier; a container without a tier uses DISK.
Retries on the policy's fallback tier (SSD to DISK, nothing for DISK or
ARCHIVE) only when target selection fails with
{{{}FAILED_TO_FIND_SUITABLE_NODE{}}}. Not governed by the bucket's
{{{}allowFallbackStoragePolicy{}}}, which SCM does not know; a strict {{HOT}}
bucket can still get a DISK repair replica.|HDDS-17536, HDDS-17592|
|Mis-replication correction|Strict: stays on the container's tier, no
fallback|HDDS-17536|
|Restoring the preferred tier|Fallback containers carry the intended tier; a
bounded background move promotes them when the preferred tier has capacity.
Reads container and replica metadata, not the block fields, and does not update
them.|HDDS-17712|
h4. Open points
# The fallback branch of {{allocateBlock}} is edited by this ticket
(classification), HDDS-17914 (fallback counter), HDDS-17712 (intended-tier
hook) and HDDS-16678. Let us agree its shape here before the PRs are opened.
This ticket builds on PR #12079.
# {{allowFallbackStoragePolicy}} defaults to true. Proposal: keep it; a strict
default would make {{HOT}} writes fail on existing clusters. Operators opt out
per bucket.
# Repair (HDDS-17536) falls back only on {{{}FAILED_TO_FIND_SUITABLE_NODE{}}};
the write path falls back on the whole capacity set. Align repair to the
section 1 classification, or record why repair is narrower.
# HDDS-17534 is open. Does this ticket add the HDDS version itself, or wait?
was (Author: JIRAUSER311863):
[~deveshsingh] Thanks. It took me a lot of time to create this doc. I am not
sure if Jira is the right place though.
h4. 1. Terms
* *Storage policy of an allocation:* resolved by OM per block allocation
request: {{KeyArgs}} policy -> open key's stored policy -> bucket policy at
request time -> OM default ({{{}ozone.om.default.storage.policy{}}},
{{{}WARM{}}}). The key's policy is stamped at create and new clients send it
back on every {{{}AllocateBlock{}}}, so a bucket policy change during a write
does not move the key's later blocks (HDDS-17374). Each policy has fixed tiers:
||Policy||Preferred tier||Fallback tier||
|{{HOT}}|SSD|DISK|
|{{WARM}}|DISK|{{EMPTY}} (none)|
|{{COLD}}|ARCHIVE|{{EMPTY}} (none)|
* *Preferred tier:* the policy's creation tier, tried first for every new
block. Never {{{}EMPTY{}}}.
* *Fallback tier:* the policy's creation fallback tier. {{EMPTY}} means the
policy has none.
* *Fallback allowed:* the bucket's {{allowFallbackStoragePolicy}} is true (OM
treats unset as true and sends the flag with every allocation) *and* the
policy's fallback tier is not {{{}EMPTY{}}}. With the policies above, only
{{HOT}} can fall back.
* *Strict request:* a request for which fallback is not allowed.
* *Policy-free request:* an SCM request without a storage policy, from an OM
that does not support storage policy. SCM uses its default policy
({{{}WARM{}}}) with fallback disabled, so the block goes to DISK.
* *Tier attempt:* everything the writable container provider does for one
tier: look for an open container, create a pipeline, wait for it, look again.
* *Failure classification:* a tier attempt that returns no container ends with
at most one structured failure, the last {{SCMException}} from pipeline
creation or from waiting for a pipeline. Its result code is classified exactly
as HDDS-17820 classifies it for the failure metric; one shared definition:
||Category||Result codes||
|{{no_space}}|{{{}FAILED_TO_FIND_NODES_WITH_SPACE{}}},
{{FAILED_TO_FIND_CONTAINER_WITH_SPACE}}|
|{{no_suitable_node}}|{{{}FAILED_TO_FIND_HEALTHY_NODES{}}},
{{FAILED_TO_FIND_SUITABLE_NODE}} (includes per-tier pipeline limits),
{{FAILED_TO_FIND_NODE_IN_POOL}}|
|{{other}}|every other result code, and every attempt without a structured
failure|
Attempts without a structured failure include safe mode, SCM HA errors,
internal errors, a pipeline readiness timeout, a pipeline that disappears while
waiting, and a created pipeline that still yields no container.
* *Tier capacity failure:* a tier attempt classified {{no_space}} or
{{{}no_suitable_node{}}}.
h4. 2. Guarantees for writes (RATIS and standalone)
# SCM *must* try the preferred tier first.
# If the preferred-tier attempt succeeds, the block *must* be on the preferred
tier.
# SCM *may* allocate on the fallback tier only when fallback is allowed *and*
the preferred-tier attempt ended in a tier capacity failure. The block goes to
a container of the fallback tier that SCM designates for fallback (today any
open container of that tier; HDDS-17712 narrows it to containers that carry the
intended tier).
# SCM *must not* fall back for an {{other}} failure: safe mode, not-leader,
timeouts, invalid block size, internal errors, a tier that produced a pipeline
but no container, or anything else outside the two categories. That failure is
returned unchanged. Consequence: a slow SSD pipeline creation fails a {{HOT}}
write rather than falling back.
# Fallback is a single attempt on the fallback tier. SCM *must not* try any
third tier.
# A strict request *must* either get a block on the preferred tier or fail. It
*must not* be placed on any other tier.
# When the last tier tried ends in a tier capacity failure (the preferred tier
for a strict request, the fallback tier otherwise), the request *must* fail
with the "tier unavailable" error (section 4), naming the tiers tried. If the
fallback-tier attempt ends in an {{other}} failure, that failure is returned
unchanged.
# A policy-free request *must* behave exactly as today: default policy, DISK,
no fallback, same errors.
# Legacy metadata: pipelines and containers created before the feature have no
stored tier. SCM never selects such a pipeline for a request that carries a
policy, and a block only reaches a container through its pipeline, so legacy
containers are unreachable for tier-aware requests. HDDS-17526 decides what to
do with legacy pipelines after finalization; mapping a null tier to DISK is
compatible with this contract, mapping it to any other tier or to "any tier"
would break guarantee 2.
*Multi-block requests.* OM asks SCM for several blocks in one call. Each block
is allocated independently under the rules above, so blocks of one call may
differ in tier and in {{{}isFallBack{}}}. The first block that fails fails the
whole call; blocks already allocated in that call are discarded.
h4. 3. Reported placement
For every allocated block the caller sees {{AllocatedBlock#getStorageTier}} and
{{{}AllocatedBlock#isFallBack{}}}, carried into OM's {{OmKeyLocationInfo}} and
persisted with the key. Their meaning is fixed because the datanode write and
HDDS-17819 depend on it:
* {{storageTier}} is the tier the block was physically placed on at
allocation. It equals the tier of the pipeline the block was allocated in and
is taken from there, not from the container. For a fallback block it is the
fallback tier. Readers: the client, which sends it to the datanode as the
volume type for container creation, and HDDS-17819's {{actualtier}} label at
commit. It is a write-time snapshot: later moves (HDDS-17712 promotion,
HDDS-17536 repair) do not update it; current placement is per replica in SCM's
container reports.
* A block has no field for the tier it was meant for. That is the key's
policy's preferred tier. {{isFallBack = true}} means the block was not placed
on it at allocation; whether its replicas are there now is answered by SCM's
container reports, not by the block.
* After HDDS-17712, for a fallback container {{ContainerInfo.storageTier}} and
the replica's declared storage type carry the intended tier (SSD), while the
pipeline's tier and the replica's {{volumeStorageType}} carry the physical one
(DISK). That is why the block tier comes from the pipeline.
* {{isFallBack}} is set by SCM in {{{}BlockManagerImpl#allocateBlock{}}}: true
when fallback was allowed, the preferred-tier attempt ended in a tier capacity
failure, and the block was then allocated on the fallback tier. False in every
other case. No other code path sets it; OM and the client only copy it.
* For a policy-bearing request: {{isFallBack = true}} implies {{storageTier}}
is the policy's fallback tier, and {{isFallBack = false}} implies
{{storageTier}} is the policy's preferred tier. Any other combination is a bug.
* For a policy-free request {{isFallBack}} is false and {{storageTier}} is
DISK.
* SCM records {{fallbackBlockCount}} and {{sampleIsFallBack}} in the audit log
for every allocation call.
h4. 4. Errors
*New result code.* A tier capacity failure on the last tier tried is reported
with one new result code, working name {{{}STORAGE_TIER_UNAVAILABLE{}}}.
* SCM: new value in {{SCMException.ResultCodes}} and in {{Status}} of
{{{}ScmServerProtocol.proto{}}}.
* OM: new value in {{OMException.ResultCodes}} and in {{Status}} of
{{{}OmClientProtocol.proto{}}}. OM maps the SCM code to it in
{{{}OMKeyRequest#allocateBlock{}}}, next to the existing mappings for
{{SAFE_MODE_EXCEPTION}} and {{{}PIPELINE_NOT_FOUND{}}}.
* The client's block-allocation retry (HDDS-16712) retries
{{SCM_IN_SAFE_MODE}} and {{{}KEY_ALLOCATION_ERROR{}}}. It must not retry
{{{}STORAGE_TIER_UNAVAILABLE{}}}; the condition is not transient.
* Message: policy, tiers tried, and the reason of the last attempt in
HDDS-17820's words ({{{}no_space{}}} or {{{}no_suitable_node{}}}), so the error
and the metric series match. OM and S3 Gateway pass it through.
* All other failures keep their current result codes.
*S3 Gateway.* A new {{S3ErrorTable}} constant {{{}StorageTierUnavailable{}}},
HTTP 507, and a {{case}} for the OM result code in {{{}translateResultCode{}}}.
Today the failure reaches S3 clients as {{InternalError}} 500: the client
cannot tell a full tier from a broken server, and the gateway logs a stack
trace for every 500. HTTP 507 (RFC 4918, "unable to store the representation")
covers both reasons and AWS SDKs do not retry it, so the caller sees the real
cause at the first attempt. MinIO answers 507 ({{{}XMinioStorageFull{}}}) when
its backend is full. Message: the S3 storage class used, the tiers tried, the
reason.
*Compatibility (ZDU).*
* {{STORAGE_TIER_UNAVAILABLE}} is appended as the last entry of all four
enums, proto number equal to the Java ordinal, since both protocols map result
codes by position. protolock accepts an appended enum value; the regenerated
{{proto.lock}} files ship with the change.
* SCM sends the new code only after the HDDS storage-policy version is
finalized. That version does not exist yet (HDDS-17534); this ticket depends on
it. Before finalization SCM returns today's codes.
* OM sends its new code only after
{{OzoneManagerVersion.STORAGE_POLICY_SUPPORT}} is finalized. Before that it
rethrows the {{SCMException}} and the client gets today's
{{{}INTERNAL_ERROR{}}}.
* Both response messages declare {{required Status status}} (proto2). A
receiver that does not know the value fails to parse the response and the write
fails. An unknown code can never look like a success. This is what protects
external clients on older jars; no {{{}ClientVersion{}}}-based downgrade, as
for OM result codes 97 to 105.
* After OM finalization, when a write fails for tier capacity: a new external
client gets {{{}STORAGE_TIER_UNAVAILABLE{}}}; an old external client gets the
parse failure (OM applies the bucket's policy for it, so a strict {{HOT}}
bucket does produce this); an S3 application gets 507 through an upgraded S3
Gateway. Policy-free requests never receive the new code. Every write that does
not fail for tier capacity is unaffected in every state.
*What the caller sees when allocation fails* (any failure, including "tier
unavailable"): no block from the request reaches the caller; SCM persists no
per-block state, and pipelines or containers created during the attempt remain
open for later allocations. The OM request fails with the error above. A new
key is not created. A key or multipart part already being written fails at its
next block allocation; its earlier blocks stay with the open key until OM's
open-key cleanup deletes them. No partial key is committed.
h4. 5. Observability
This ticket adds no metric. Visibility comes from HDDS-17820 (failed tier
attempts by tier and reason, using the classification in section 1), HDDS-17914
(successful fallback allocations, counting blocks with {{{}isFallBack =
true{}}}) and HDDS-17819 (committed bytes by policy, requested tier, actual
tier and outcome, derived from the section 3 fields). A policy-free key is
reported as {{UNKNOWN}} by HDDS-17819.
h4. 6. Granularity
Fallback is decided per block. Blocks of one key may be on different tiers. The
policy is fixed per key, but {{allowFallbackStoragePolicy}} is read from the
bucket at every allocation, so flipping it during a write changes whether later
blocks may fall back. A bucket policy change does not move existing keys; that
is the migration chain HDDS-17059 and HDDS-17073, whose rewrites go through
{{allocateBlock}} and so follow this contract. Moving fallback data back to the
preferred tier is HDDS-17712 and not part of this contract.
h4. 7. Rules for the other paths
||Path||Rule||Ticket||
|Write, RATIS / standalone|Sections 1 to 6|HDDS-17535 (this)|
|Write, EC|Until EC placement is tier-aware, EC blocks go to the default tier
regardless of the requested policy, never fall back, never return "tier
unavailable", and report {{{}isFallBack = false{}}}. Today the requested tier
reaches the EC provider for new pipelines while existing pipelines are reused
regardless of tier, and the fallback branch applies to EC; this ticket adds the
guard in {{allocateBlock}} that makes the rule hold. Once HDDS-16678 lands, EC
follows sections 1 to 6 unchanged.|HDDS-16678|
|Container Balancer|Never falls back: a move stays within one storage
type|HDDS-16653|
|Disk Balancer|Never falls back: a move stays within one storage
type|HDDS-17725|
|Repair of under-replicated and quasi-closed-stuck RATIS containers|Target
chosen on the container's stored tier; a container without a tier uses DISK.
Retries on the policy's fallback tier (SSD to DISK, nothing for DISK or
ARCHIVE) only when target selection fails with
{{{}FAILED_TO_FIND_SUITABLE_NODE{}}}. Not governed by the bucket's
{{{}allowFallbackStoragePolicy{}}}, which SCM does not know; a strict {{HOT}}
bucket can still get a DISK repair replica.|HDDS-17536, HDDS-17592|
|Mis-replication correction|Strict: stays on the container's tier, no
fallback|HDDS-17536|
|Restoring the preferred tier|Fallback containers carry the intended tier; a
bounded background move promotes them when the preferred tier has capacity.
Reads container and replica metadata, not the block fields, and does not update
them.|HDDS-17712|
h4. Open points
# The fallback branch of {{allocateBlock}} is edited by this ticket
(classification), HDDS-17914 (fallback counter), HDDS-17712 (intended-tier
hook) and HDDS-16678. Let us agree its shape here before the PRs are opened.
This ticket builds on PR #12079.
# {{allowFallbackStoragePolicy}} defaults to true. Proposal: keep it; a strict
default would make {{HOT}} writes fail on existing clusters. Operators opt out
per bucket.
# Repair (HDDS-17536) falls back only on {{{}FAILED_TO_FIND_SUITABLE_NODE{}}};
the write path falls back on the whole capacity set. Align repair to the
section 1 classification, or record why repair is narrower.
# HDDS-17534 is open. Does this ticket add the HDDS version itself, or wait?
> Define strict and fallback storage-tier allocation contract
> -----------------------------------------------------------
>
> Key: HDDS-17535
> URL: https://issues.apache.org/jira/browse/HDDS-17535
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: Ozone Filesystem
> Reporter: Devesh Kumar Singh
> Priority: Major
>
> Specify and implement preferred tier, authorized fallback, unavailable-tier
> errors, selection reporting and interaction with RATIS/EC placement.
> *Reason:* Even a fully upgraded cluster can be unable to satisfy placement
> intent; finalization is not capacity validation.
> *Acceptance criteria:* Strict requests fail when infeasible; fallback uses
> only permitted tiers; physical choices observable; policy-free behavior
> unchanged.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]