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

ASF GitHub Bot commented on IGNITE-8957:
----------------------------------------

GitHub user andrewmed opened a pull request:

    https://github.com/apache/ignite/pull/4334

    IGNITE-8957: fix assert when histMap is empty

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-8957

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/4334.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4334
    
----
commit 3f43740fbf0cc0757193075f9b9de5300e284fe8
Author: AMedvedev <andrew.y.medvedev>
Date:   2018-07-09T13:11:56Z

    IGNITE-8957: fix assert when histMap is empty

----


> testFailGetLock() constantly fails. Last entry checkpoint history can be empty
> ------------------------------------------------------------------------------
>
>                 Key: IGNITE-8957
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8957
>             Project: Ignite
>          Issue Type: Bug
>          Components: persistence
>    Affects Versions: 2.7
>            Reporter: Maxim Muzafarov
>            Assignee: Andrew Medvedev
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain
>
> IgniteChangeGlobalStateTest#testFailGetLock constantly fails with exception:
> {code}
> java.lang.AssertionError
>       at 
> org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointHistory.onCheckpointFinished(CheckpointHistory.java:205)
>       at 
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$Checkpointer.markCheckpointEnd(GridCacheDatabaseSharedManager.java:3654)
>       at 
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$Checkpointer.doCheckpoint(GridCacheDatabaseSharedManager.java:3178)
>       at 
> org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager$Checkpointer.body(GridCacheDatabaseSharedManager.java:2953)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> As Sergey Chugunov 
> [mentioned|https://issues.apache.org/jira/browse/IGNITE-8737?focusedCommentId=16535062&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16535062],
>  issue can be solved different ways:
> {quote}
> It seems we missed a case when lastEntry may be empty. We may choose here 
> from two options:
> * Check if histMap is empty inside onCheckpointFinished. If it is just don't 
> log anything (it was the very first checkpoint).
> * Check in caller that there is no history, calculate necessary index in 
> caller and pass it to onCheckpointFinished to prepare correct log 
> message.{quote}



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

Reply via email to