You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Bessonov (Jira)" <ji...@apache.org> on 2023/10/27 09:10:00 UTC
[jira] [Created] (IGNITE-20754) Fix log prefix truncation in logit storage
Ivan Bessonov created IGNITE-20754:
--------------------------------------
Summary: 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
{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)