[ 
https://issues.apache.org/jira/browse/HDDS-15941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-15941:
----------------------------------
    Labels: pull-request-available  (was: )

> Resolve client before block loop and return null from sortDatanodesForWrite
> ---------------------------------------------------------------------------
>
>                 Key: HDDS-15941
>                 URL: https://issues.apache.org/jira/browse/HDDS-15941
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Chi-Hsuan Huang
>            Assignee: Chi-Hsuan Huang
>            Priority: Major
>              Labels: pull-request-available
>
> Follow\-up to the HDDS\-15059 review feedback in 
> [https://github.com/apache/ozone/pull/10633#pullrequestreview\-4746713524:|https://github.com/apache/ozone/pull/10633#pullrequestreview-4746713524:]
> # In OMKeyRequest#allocateBlock, the client is fixed for the whole request, 
> but the current code retries client resolution for every pipeline when the 
> client cannot be resolved. Resolve the client once before the block loop, and 
> when the client cannot be resolved, fall back to SCM\-side sorting by passing 
> the remoteAddress to SCM.
> [https://github.com/apache/ozone/pull/10633#discussion\_r3623837258|https://github.com/apache/ozone/pull/10633#discussion_r3623837258]
> # KeyManagerImpl#sortDatanodesForWrite returns the input list instance to 
> signal that no sort happened, and the caller checks reference equality 
> \(sortedNodes \!= nodes\). This looks like a bug and is fragile \(someone may 
> change it to equals later\). Return null instead when no sort happens, and 
> have callers check for null.
> [https://github.com/apache/ozone/pull/10633#discussion\_r3623861478|https://github.com/apache/ozone/pull/10633#discussion_r3623861478]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to