[ 
https://issues.apache.org/jira/browse/RATIS-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shashikant Banerjee updated RATIS-884:
--------------------------------------
        Parent: RATIS-863
    Issue Type: Sub-task  (was: Bug)

> Failed UT: TestRaftLogMetrics.testRaftLogMetrics
> ------------------------------------------------
>
>                 Key: RATIS-884
>                 URL: https://issues.apache.org/jira/browse/RATIS-884
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: runzhiwang
>            Assignee: runzhiwang
>            Priority: Major
>         Attachments: RATIS-884.001.patch, screenshot-1.png, screenshot-2.png
>
>
> *What's the problem ?*
>  !screenshot-1.png! 
> *What's the reason ?*
> As the images shows, flushCount.incrementAndGet() happens in the 1st 
> statement: stateMachine.flushStateMachineData(lastWrittenIndex), 
> ratisMetricRegistry.get(RAFT_LOG_FLUSH_TIME) increase after the 2nd 
> statement: timerContext.stop(). If the test 
> Assert.assertEquals(expectedFlush, tm.getCount()) happens between 1st and 2nd 
> statement, then the expectedFlush will be tm.getCount() + 1, so the test fail.
>  !screenshot-2.png! 
> *How to fix ?*
> Retry check expectedFlush == tm.getCount()



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

Reply via email to