[
https://issues.apache.org/jira/browse/IGNITE-23291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-23291:
-------------------------------------
Fix Version/s: 3.0
> 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
> Fix For: 3.0
>
> Time Spent: 3h
> 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)