fapifta opened a new pull request #2911:
URL: https://github.com/apache/ozone/pull/2911


   ## What changes were proposed in this pull request?
   The problem is with the selection of failing nodes in 
TestOzoneECClient#testNodeFailuresWhileWriting.
   If we write two chunks only after a failure, and If we select for example 
node3 in the block group to fail, then the write will not fail, as we don't 
actually write to node3 in this case.
   Similarly, if we write one chunk after a failure, and if we select node 2 or 
node 3 to fail, then as we don't actually will write to these nodes the write 
won't fail.
   
   The selection logic itself is easy, we get the keyset of the storages map 
from the MockXCieverClientFactory which maps DataNodeDetails to 
MockDataNodeStorages, and we go over the keyset, and set numFailureToInject 
nodes to fail.
   I have modified this logic to sort the keyset and put the nodes that we 
won't write to at the back of the list.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-6083
   
   ## How was this patch tested?
   Put up a loop, and ran the test 1000 times, evaluated the nodes selected to 
fail, and I saw all the nodes that we write to as selected, but none of the 
nodes that we won't write to, in case when testNodeFailuresWhileWriting method 
is called with parameters (2, 1), (2, 2), (1, 1), (1, 2). Also ran all tests in 
TestOzoneECClient.


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