[
https://issues.apache.org/jira/browse/IGNITE-28218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Polovtsev updated IGNITE-28218:
-----------------------------------------
Description:
There's a corner case related to segment file compaction and suffix truncation:
# We add some entries to the log of Raft Group A;
# We add enough entries to populate, say, two segment files;
# We truncate the suffix of the Raft Group A up to the very first entry (exact
entry does not matter, what matters is that this entry must be present in the
first segment file). This means that all entries in the second segment file are
effectively obsolete.
# We add more entries to the log, creating a third segment file;
# We run the GC, it sees that the second file does not contain any useful
entries and deletes it. This breaks the invariant that all file ordinals must
be consecutive, because we will have segment files with ordinals 1 and 3.
> Incorrect file truncation wrt suffix truncation
> -----------------------------------------------
>
> Key: IGNITE-28218
> URL: https://issues.apache.org/jira/browse/IGNITE-28218
> Project: Ignite
> Issue Type: Bug
> Reporter: Aleksandr Polovtsev
> Assignee: Aleksandr Polovtsev
> Priority: Major
> Labels: ignite-3
>
> There's a corner case related to segment file compaction and suffix
> truncation:
> # We add some entries to the log of Raft Group A;
> # We add enough entries to populate, say, two segment files;
> # We truncate the suffix of the Raft Group A up to the very first entry
> (exact entry does not matter, what matters is that this entry must be present
> in the first segment file). This means that all entries in the second segment
> file are effectively obsolete.
> # We add more entries to the log, creating a third segment file;
> # We run the GC, it sees that the second file does not contain any useful
> entries and deletes it. This breaks the invariant that all file ordinals must
> be consecutive, because we will have segment files with ordinals 1 and 3.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)