[ 
https://issues.apache.org/jira/browse/HDDS-2368?focusedWorklogId=334567&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-334567
 ]

ASF GitHub Bot logged work on HDDS-2368:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Oct/19 19:20
            Start Date: 26/Oct/19 19:20
    Worklog Time Spent: 10m 
      Work Description: adoroszlai commented on pull request #93: HDDS-2368. 
TestOzoneManagerDoubleBufferWithDummyResponse failing intermittently
URL: https://github.com/apache/hadoop-ozone/pull/93
 
 
   ## What changes were proposed in this pull request?
   
   Fix TestOzoneManagerDoubleBufferWithDummyResponse, which (very) 
intermittently fails at:
   
   ```
   
testDoubleBufferWithDummyResponse(TestOzoneManagerDoubleBufferWithDummyResponse.java:116)
   ```
   
   * 
https://github.com/elek/ozone-ci-03/blob/master/pr/pr-hdds-2345-jsf2s/unit/hadoop-ozone/ozone-manager/org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse.txt
 
   * 
https://github.com/elek/ozone-ci-03/blob/master/pr/pr-hdds-2272-bfh6s/unit/hadoop-ozone/ozone-manager/org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse.txt
   
   Variables are set in one thread (`OzoneManagerDoubleBuffer#daemon`):
   
   
https://github.com/apache/hadoop-ozone/blob/6a6558025ec35203bfd61839aadf7b2a26520222/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerDoubleBuffer.java#L160-L186
   
   and checked in the test thread:
   
   
https://github.com/apache/hadoop-ozone/blob/6a6558025ec35203bfd61839aadf7b2a26520222/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithDummyResponse.java#L110-L117
   
   The test waits for the first variable (`flushedTransactionCount`) to reach 
`bucketCount`.  The other variable (`totalNumOfFlushedTransactions`) is set 
later, so the test thread may reach the assertion before the updater thread 
reaches `updateMetrics`.
   
   The proposed fix swaps check of variables in the test: wait for the second 
variable and let the assertion check the first one.  This guarantees that both 
of them are updated by the time `waitFor` returns.
   
   https://issues.apache.org/jira/browse/HDDS-2368
   
   ## How was this patch tested?
   
   Reproduced the failure by adding some sleep in 
`OzoneManagerDoubleBuffer#updateMetrics`.  Verified the test passes with the 
fix despite the sleep.
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 334567)
    Remaining Estimate: 0h
            Time Spent: 10m

> TestOzoneManagerDoubleBufferWithDummyResponse failing intermittently
> --------------------------------------------------------------------
>
>                 Key: HDDS-2368
>                 URL: https://issues.apache.org/jira/browse/HDDS-2368
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.5.0
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {noformat}
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.479 s <<< 
> FAILURE! - in 
> org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse
> testDoubleBufferWithDummyResponse(org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse)
>   Time elapsed: 1.404 s  <<< FAILURE!
> java.lang.AssertionError
> ...
>       at 
> org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse.testDoubleBufferWithDummyResponse(TestOzoneManagerDoubleBufferWithDummyResponse.java:116)
> {noformat}
> * 
> https://github.com/elek/ozone-ci-03/blob/master/pr/pr-hdds-2345-jsf2s/unit/hadoop-ozone/ozone-manager/org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse.txt
>  
> * 
> https://github.com/elek/ozone-ci-03/blob/master/pr/pr-hdds-2272-bfh6s/unit/hadoop-ozone/ozone-manager/org.apache.hadoop.ozone.om.ratis.TestOzoneManagerDoubleBufferWithDummyResponse.txt
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to