You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2024/09/27 14:26:00 UTC
[jira] [Commented] (IGNITE-23291) Improve the local compaction mechanism of Metastorage
[ https://issues.apache.org/jira/browse/IGNITE-23291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885387#comment-17885387 ]
Roman Puchkovskiy commented on IGNITE-23291:
--------------------------------------------
The patch looks good to me
> Improve the local compaction mechanism of Metastorage
> -----------------------------------------------------
>
> Key: IGNITE-23291
> URL: https://issues.apache.org/jira/browse/IGNITE-23291
> Project: Ignite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> We need to improve local compaction of Metastorage, which is done in *org.apache.ignite.internal.metastorage.impl.MetaStorageService#compact*.
> * Perhaps it should be moved to another place.
> * It should accept the revision to which keys should be compacted instead of the timestamp.
> * For each key, those versions whose revisions are less than or equal to the revision of the compaction will be compacted (deleted). If the latest version is equal to the compaction revision, it will not be compacted unless it's a tombstone.
> First example: The key "foo" had versions with revisions 1, 3 and 5. After compaction to revision 3, the key will only have a version with revision 5.
> Second example: The key "foo" had versions with revisions 1, 3 and 5. After compaction to revision 10, the key will only have a version with revision 5.
> Third example: The key "foo" had versions with revisions 1, 3 and 5 (tombstone). After compaction to revision 5 (or 10), all revisions will be deleted.
> * If a key has only one version, it will not be compacted (deleted).
> For example: The key "foo" has only one version with revision 5. After compacting to revision 5 or higher, this record will not be touched and will remain with revision 5.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)