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

   ## What changes were proposed in this pull request?
   This PR fixes the Intermittent failure in 
`TestOzoneRpcClientAbstract.testListSnapshot`.
   
   `TestOzoneRpcClientAbstract.testListSnapshot` creates 20 snapshots using 
`createSnapshot` API and asserts the count of same using `listSnapshot` API. 
This assertion of count fails intermittently.
   
   `listSnapshot` API uses the 
`org.apache.hadoop.ozone.om.ListIterator.MinHeapIterator` which internally uses 
both CacheIterator and DBIterator and DBIterator had the logic of checking if 
rocks DB key is present in cache in 
`org.apache.hadoop.ozone.om.ListIterator.DbTableIter#getNextKey`, this checks 
the cache from table cache which may be intermittently flushed which makes the 
addition of duplicate entry in 
`org.apache.hadoop.ozone.om.ListIterator.MinHeapIterator`.  So to fix this, we 
should use the pre-loaded keys in 
`org.apache.hadoop.ozone.om.ListIterator.CacheIter#cacheKeyMap` in 
`org.apache.hadoop.ozone.om.ListIterator.CacheIter`.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9967
   
   ## How was this patch tested?
   
   This patch is tested by repeated CI runs around 500 iterations and ZERO 
failure reported for this test case. Here is the green CI 
[link](https://github.com/devmadhuu/ozone/actions/runs/7470560512/job/20330782349).
   


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