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

Ivan Bessonov updated IGNITE-20754:
-----------------------------------
    Epic Link: IGNITE-23240

> Fix log prefix truncation in logit storage
> ------------------------------------------
>
>                 Key: IGNITE-20754
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20754
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Ivan Bessonov
>            Priority: Major
>              Labels: ignite-3
>
> {code:java}
> Utils.runInThread(executor, () -> {
>     this.indexDB.truncatePrefix(firstIndexKept);
>     this.segmentLogDB.truncatePrefix(firstIndexKept);
>     this.confDB.truncatePrefix(firstIndexKept);
> }); {code}
> Currently, this code doesn't work if we truncate log after loading raft 
> snapshot from the leader. The problem is in the gap in index file, that 
> prevents new log entries to be written.
> Possible solution - differentiate between "safe" log truncation and "unsafe". 
> Here I mean that if index N is present in the log, then we can truncate log 
> to it.
> Otherwise, truncation is equivalent to entire log invalidation, and it should 
> be performed differently. Either synchronously, or somehow guaranteeing that 
> same files won't be used for writes.



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

Reply via email to