tanvipenumudy opened a new pull request, #5322: URL: https://github.com/apache/ozone/pull/5322
## What changes were proposed in this pull request? After the implementation of [HDDS-8300](https://issues.apache.org/jira/browse/HDDS-8300), get key metadata API in OM sorts datanodes to allow clients to optimize data I/O based on locality. However, as of today, this requires OM to make additional calls to SCM for sorting the datanodes. The get key metadata API makes 2 separate calls to SCM: one to retrieve the container pipelines and the second responsible for sorting the datanodes in the container pipelines, as illustrated in the code snippet [KeyManagerImpl#getKeyInfo](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L1946-L1959): ``` if (!args.isHeadOp()) { ... // get container pipeline info from cache. captureLatencyNs(metrics.getGetKeyInfoRefreshLocationLatencyNs(), () -> refreshPipelineFromCache(value, args.isForceUpdateContainerCacheFromSCM())); if (args.getSortDatanodes()) { sortDatanodes(clientAddress, value); } ``` For performance enhancement, these two calls can be combined into one allowing the result to be cached in the existing `containerLocationCache` in `ScmClient`. More details on the analysis and implementation can be found [here](https://issues.apache.org/jira/browse/HDDS-9272). ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-9272 ## How was this patch tested? The existing tests should cover the changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
