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


   ## What changes were proposed in this pull request?
   
   `TestOzoneManagerDoubleBufferWithDummyResponse` fails intermittently at:
   
   
https://github.com/apache/ozone/blob/c42659531cd70595bbf4feaa0a410cc0d231754e/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithDummyResponse.java#L124
   
   when all `flushTime` samples are 0:
   
   ```
   
testDoubleBufferWithDummyResponse(org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse)
  Time elapsed: 1.03 s  <<< FAILURE!
   java.lang.AssertionError: Samples = 2  Min = 0.0  Mean = 0.0  Std Dev = 0.0  
Max = 1.401298464324817E-45 Total = 0.0
   ```
   
   (Note that `Max` is wrong, which seems to be a bug in `SampleStat.MinMax`.)
   
   This may happen because flush time is in milliseconds:
   
   ```
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 0, nanos 
690896, count 1
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 0, nanos 
180977, count 99
   ```
   
   but because CI VMs are not too fast, usually at least one of the flushes 
takes more than 0 milliseconds:
   
   ```
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 1, nanos 
1467924, count 1
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 0, nanos 
163802, count 99
   ```
   
   or even more:
   
   ```
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 13, 
nanos 12596563, count 1
   (OzoneManagerDoubleBuffer.java:flushTransactions(297)) - flush time 1, nanos 
317304, count 99
   ```
   
   https://issues.apache.org/jira/browse/HDDS-4767
   
   ## How was this patch tested?
   
   Repeated TestOzoneManagerDoubleBufferWithDummyResponse 100x:
   https://github.com/adoroszlai/hadoop-ozone/runs/1806024475
   
   Regular CI:
   https://github.com/adoroszlai/hadoop-ozone/actions/runs/527480982


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

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