sarvekshayr opened a new pull request, #11861:
URL: https://github.com/apache/ozone/pull/11861

   ## What changes were proposed in this pull request?
   HDDS-16044 made SCM resolve each pipeline member's current version from 
NodeManager while building
   `ContainerWithPipeline` responses 
(`StorageContainerLocationProtocolServerSideTranslatorPB#currentVersions`).
   If any member is not registered, the whole request fails with
   `SCMException: Failed to lookup datanode <dn> in NodeManager` 
(`NO_SUCH_DATANODE`).
   
   NodeManager is in memory and only holds datanodes that have registered since 
SCM started, while pipelines
   are reloaded from the SCM DB with all of their original members. So any time 
a member is down or has not
   re-registered yet, for example a datanode stopped before an SCM restart, 
every read that returns that pipeline fails
   until the pipeline is closed. Before HDDS-16044 these calls had no 
NodeManager dependency and succeeded.
   
   This affects all of the translator's `ContainerWithPipeline` responses 
(`getContainerWithPipeline`,
   `getContainerWithPipelineBatch`, `getExistContainerWithPipelinesInBatch`, 
`allocateContainer`), and so
   every client that uses them, such as `ozone admin container info` and 
OM/client container lookups.
   
   Changes:
   * `currentVersions()` no longer throws for an unregistered member. It leaves 
the member out of the version map,
     so the member keeps the version carried by its pipeline copy. Registered 
members still get their live version.
   * `Pipeline#getProtobufMessageInternal` now skips a null version override. 
Its javadoc already states that members
     absent from the map keep their own version, but a null lookup result 
caused an NPE in `serialize()`.
   
   The write path 
(`ScmBlockLocationProtocolServerSideTranslatorPB#currentNodes`, used by 
`allocateBlock`) is unchanged.
   
   ## What is the link to the Apache JIRA
   [HDDS-17580](https://issues.apache.org/jira/browse/HDDS-17580)
   
   ## How was this patch tested?
   Manual testing in-progress.


-- 
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]

Reply via email to