[
https://issues.apache.org/jira/browse/HDDS-17535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152048#comment-18152048
]
Devesh Kumar Singh edited comment on HDDS-17535 at 11/27/26, 2:26 PM:
----------------------------------------------------------------------
Thanks [~greenwich], this is a solid contract. Agreed on all five decisions,
with one caveat on decision 2 and one addition to decision 3 (both below), and
on open points 1, 2 and 4. A few responses:
*Decision 3 (reporting).* Agreed. Please also state the invariant explicitly:
a block whose tier SCM did not report is recorded as UNKNOWN, never DISK. Today
ScmBlockLocationProtocolClientSideTranslatorPB converts the tier with
StorageTier.fromProto(resp.getStorageTier()) without checking
resp.hasStorageTier(), so an absent tier becomes DISK_TIER (Gap 15). HDDS-17819
and HDDS-17712 rely on these two fields, so the contract should require
"missing tier = UNKNOWN" and reference that fix, otherwise the reporting rule
is undermined.
*Open point 1 (shape of the allocateBlock fallback branch).* Strong yes,
let's pin it here before anyone opens a PR. That branch is touched by this
ticket, HDDS-17914, HDDS-17712 and HDDS-16678, so agreeing one structure now
avoids four PRs each reworking it. Please sketch the intended branch in the
contract.
*Open point 2 (allowFallbackStoragePolicy default true).* Keep it. Flipping
the default would change behaviour for existing buckets.
*Open point 3 (repair vs write-path fallback trigger).* I looked at both
paths and I think this is a consistency question, not a behaviour gap today:
* The write path inspects the specific result code and falls back only for
the no_space / no_suitable_node groups, never for safe mode, not-leader,
timeout or internal (reusing HDDS-17820's classification).
* Repair's {{ReplicationManagerUtil.getTargetDatanodes}} collapses every
placement failure into a single {{FAILED_TO_FIND_SUITABLE_NODE}}, and
{{RatisUnderReplicationHandler}} falls back on that one code.
* In the common cases they match: "no SSD nodes" and "SSD full" both end up
falling back to DISK on each path, because repair's helper reports "full" as
{{FAILED_TO_FIND_SUITABLE_NODE}} too.
* The risk is drift, not current divergence: if a new placement-failure code
is added later, the write path's explicit set won't pick it up automatically
while repair's collapse still will, and the two paths quietly diverge.
* Proposal: accept the two mechanisms (repair can't see the finer codes, its
helper has already collapsed them), but write the shared intent in the contract
once: both fall back only for capacity/suitability failures, never for
safe-mode / not-leader / timeout / internal; the write path enforces this by
result-code classification, repair by getTargetDatanodes surfacing only
FAILED_TO_FIND_SUITABLE_NODE. No behaviour change, just a pinned invariant so
they can't drift.
*Open point 4 (HDDS-17534 version).* Don't add the version here. HDDS-17534
("Keep SCM/DN policy behaviour backward-compatible before HDDS finalization")
owns the finalization gate. This ticket should state that
STORAGE_TIER_UNAVAILABLE must be gated and reference HDDS-17534 for the
mechanism, so the contract isn't blocked on the version work.
One thing to double-check on decision 2: *S3 HTTP 507*. 507 is WebDAV
"Insufficient Storage", not a standard S3/AWS error, so S3 SDKs may not map it
cleanly. There's no native S3 equivalent for "strict tier unsatisfiable", so
it's a judgement call, but could you confirm how S3 Gateway maps its other
non-standard errors before we lock in 507? 503 ServiceUnavailable or a
400-family InvalidStorageClass may be friendlier to existing clients.
The required-field fail-safe in decision 2 checks out:
SCMBlockLocationResponse.status is a required proto2 enum, so an old client
that receives an unknown value rejects the message rather than misreading it.
Good.
Happy to review the full contract md. Thanks for driving this.
was (Author: JIRAUSER295411):
Thanks [~greenwich], this is a solid contract. Agreed on decisions 1, 4 and 5,
and on open points 1, 2 and 4. A few responses:
*Open point 1 (shape of the allocateBlock fallback branch).* Strong yes, let's
pin it here before anyone opens a PR. That branch is touched by this ticket,
HDDS-17914, HDDS-17712 and HDDS-16678, so agreeing one structure now avoids
four PRs each reworking it. Please sketch the intended branch in the contract.
*Open point 2 (allowFallbackStoragePolicy default true).* Keep it. Flipping the
default would change behaviour for existing buckets.
*Open point 4 (HDDS-17534 version).* Don't add the version here. HDDS-17534
("Keep SCM/DN policy behaviour backward-compatible before HDDS finalization")
owns the finalization gate. This ticket should state that
STORAGE_TIER_UNAVAILABLE must be gated and reference HDDS-17534 for the
mechanism, so the contract isn't blocked on the version work.
*Open point 3 (repair vs write-path fallback trigger).* I looked at both paths
and I think this is a consistency question, not a behaviour gap today:
* The write path inspects the specific result code and falls back only for the
no_space / no_suitable_node groups, never for safe mode, not-leader, timeout or
internal (reusing HDDS-17820's classification).
* Repair's {{ReplicationManagerUtil.getTargetDatanodes}} collapses every
placement failure into a single {{FAILED_TO_FIND_SUITABLE_NODE}}, and
{{RatisUnderReplicationHandler}} falls back on that one code.
* In the common cases they match: "no SSD nodes" and "SSD full" both end up
falling back to DISK on each path, because repair's helper reports "full" as
{{FAILED_TO_FIND_SUITABLE_NODE}} too.
* The risk is drift, not current divergence: if a new placement-failure code
is added later, the write path's explicit set won't pick it up automatically
while repair's collapse still will, and the two paths quietly diverge.
* Proposal: accept the two mechanisms (repair can't see the finer codes, its
helper has already collapsed them), but write the shared intent in the contract
once: both fall back only for capacity/suitability failures, never for
safe-mode / not-leader / timeout / internal; the write path enforces this by
result-code classification, repair by getTargetDatanodes surfacing only
FAILED_TO_FIND_SUITABLE_NODE. No behaviour change, just a pinned invariant so
they can't drift.
One thing to double-check on decision 2: *S3 HTTP 507*. 507 is WebDAV
"Insufficient Storage", not a standard S3/AWS error, so S3 SDKs may not map it
cleanly. There's no native S3 equivalent for "strict tier unsatisfiable", so
it's a judgement call, but could you confirm how S3 Gateway maps its other
non-standard errors before we lock in 507? 503 ServiceUnavailable or a
400-family InvalidStorageClass may be friendlier to existing clients.
The required-field fail-safe in decision 2 checks out:
SCMBlockLocationResponse.status is a required proto2 enum, so an old client
that receives an unknown value rejects the message rather than misreading it.
Good.
> 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
> Attachments: hdds-17535-contract-reviewd.md
>
>
> 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]