adoroszlai opened a new pull request #3173:
URL: https://github.com/apache/ozone/pull/3173


   ## What changes were proposed in this pull request?
   
   `DatanodeUsageInfo` passes _datanode_ version 
(`datanodeDetails.getCurrentVersion()`) to the `toProto` method instead of 
_client_ version.  Datanode builds the response based on that version number.  
If client is at version 0 and datanode at version 1, client cannot handle 
unknown ports. But here datanode will include replication port in DN details 
proto, based on its own version=1.  I think that specific situation is not 
possible, because usageinfo command did not exist at client version=0. But the 
same could happen if we introduced a new pair of client and datanode versions.
   
   This PR changes to use client version, which is sent in 
`ScmContainerLocationRequest#version`:
   
   
https://github.com/apache/ozone/blob/bf38696d061be8e54968b595bc22bc4744bb9251/hadoop-hdds/interface-admin/src/main/proto/ScmAdminProtocol.proto#L43
   
   https://issues.apache.org/jira/browse/HDDS-6418
   
   ## How was this patch tested?
   
   Added integration test case, which verifies that the response is built based 
on client's version.  (It tests with datanode version = 0 and client version = 
1, which is a bit different situation, but it's eaiser to tweak datanode 
version for the test).
   
   https://github.com/adoroszlai/hadoop-ozone/actions/runs/1945512550


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