[ 
https://issues.apache.org/jira/browse/RATIS-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797725#comment-16797725
 ] 

Tsz Wo Nicholas Sze commented on RATIS-506:
-------------------------------------------

[~arpitagarwal], thanks for reviewing the patch.

The state machine can lag behind. The assertion is to wait for the state 
machine to catch up.

lastCommittedEntry actually is the entry at loggedCommitIndex.  There could be 
newly added entries so that it is possible to have 
lastCommittedEntry.getIndex() < lastAppliedTermIndex.getIndex().

> ServerRestartTests.testRestartCommitIndex may fail intermittently
> -----------------------------------------------------------------
>
>                 Key: RATIS-506
>                 URL: https://issues.apache.org/jira/browse/RATIS-506
>             Project: Ratis
>          Issue Type: Bug
>          Components: test
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Minor
>         Attachments: r506_20190320.patch, r506_20190320b.patch, 
> r506_20190320c.patch
>
>
> {code}
> java.lang.AssertionError: 
> Expected :101
> Actual   :111
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:834)
>       at org.junit.Assert.assertEquals(Assert.java:645)
>       at org.junit.Assert.assertEquals(Assert.java:631)
>       at 
> org.apache.ratis.server.ServerRestartTests.runTestRestartCommitIndex(ServerRestartTests.java:276)
> {code}
> It seems that the test runs too fast so that the last metadata entry is not 
> yet written.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to