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

Ivan Bessonov reassigned IGNITE-20419:
--------------------------------------

    Assignee: Ivan Bessonov

> Raft "snapshots" are broken in aipersist
> ----------------------------------------
>
>                 Key: IGNITE-20419
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20419
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Ivan Bessonov
>            Assignee: Ivan Bessonov
>            Priority: Major
>              Labels: ignite-3
>
> This code:
> {code:java}
> storage.runConsistently(locker -> {
>     storage.lastApplied(maxLastAppliedIndex, maxLastAppliedTerm);
>     return null;
> }); {code}
> Here we don't touch any pages. As a result, updated index value may not be 
> persisted to the storage in the next checkpoint. This causes eventual 
> exception on restart:
> {noformat}
> java.lang.IllegalArgumentException: Try to truncate logs before 336, but the 
> firstLogIndex is 370
>       at 
> org.apache.ignite.raft.jraft.util.Requires.requireTrue(Requires.java:92) 
> ~[main/:?]
>       at 
> org.apache.ignite.raft.jraft.storage.impl.LogManagerImpl.truncatePrefix(LogManagerImpl.java:997)
>  ~[main/:?]
>       at 
> org.apache.ignite.raft.jraft.storage.impl.LogManagerImpl.setSnapshot(LogManagerImpl.java:654)
>  ~[main/:?]
> ...{noformat}
> In checkpointer, we must check for changed meta as well.
> Everything here can be tested with unit tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to