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

   ## What changes were proposed in this pull request?
   This PR is to fix the flakiness in 
`TestGetCommittedBlockLengthAndPutKey#tesGetCommittedBlockLength`. Here the 
test case doing writeChunks call and then `putBlock` which should save the 
blockId in BlockData table of container DB, but this persistence of blockdata 
seems taking time by fraction of second due to which immediate 
`GetCommittedBlockLength` call by test client sometime fail and throws 
exception below:
   ```
   
org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException: 
Unable to find the block. BlockID : conID: 1 locID: 111486602482745345 bcsId: 0
        at 
org.apache.hadoop.ozone.container.keyvalue.impl.BlockManagerImpl.getBlockByID(BlockManagerImpl.java:359)
        at 
org.apache.hadoop.ozone.container.keyvalue.impl.BlockManagerImpl.getCommittedBlockLength(BlockManagerImpl.java:284)
        at 
org.apache.hadoop.ozone.container.keyvalue.KeyValueHandler.handleGetCommittedBlockLength(KeyValueHandler.java:622)
   ```
   This PR changes tries to fix the flakiness by adding waitFor 
`GetCommittedBlockLength` call till the response provides blockId successfully.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-6627
   
   ## How was this patch tested?
   This patch was tested using repeated CI run with 500 iterations. Here is the 
green CI [link](https://github.com/devmadhuu/ozone/actions/runs/7020463753).


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