[
https://issues.apache.org/jira/browse/IGNITE-23283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17887810#comment-17887810
]
Roman Puchkovskiy commented on IGNITE-23283:
--------------------------------------------
The patch looks good to me
> Add CompactedException throwing for single get metastorage methods
> ------------------------------------------------------------------
>
> Key: IGNITE-23283
> URL: https://issues.apache.org/jira/browse/IGNITE-23283
> Project: Ignite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Time Spent: 40m
> Remaining Estimate: 0h
>
> We need to add throwing
> *org.apache.ignite.internal.metastorage.exceptions.CompactedException* for
> single get methods for metastorage:
> *
> org.apache.ignite.internal.metastorage.MetaStorageManager#get(org.apache.ignite.internal.lang.ByteArray,
> long)
> *
> org.apache.ignite.internal.metastorage.MetaStorageManager#getLocally(org.apache.ignite.internal.lang.ByteArray,
> long)
> *
> org.apache.ignite.internal.metastorage.impl.MetaStorageService#get(org.apache.ignite.internal.lang.ByteArray,
> long)
> Such methods will throw a {*}CompactedException{*}:
> # The key exists and the requested revision of the key has already been
> compacted.
> # The key does not exist and the requested revision has already been
> compacted.
> Let's say there is a key "foo" in the metastorage with a single revision 3.
> The metastorage has finished compacting to revision 5.
> The key "bar" has never been in the metastorage.
> Let's look at some examples:
> # MetaStorageManager#get(“foo”, 1) - a *CompactedException* will be thrown.
> # MetaStorageManager#get(“foo”, 2) - a *CompactedException* will be thrown.
> # MetaStorageManager#get(“foo”, 3) - will return a single value with
> revision 3.
> # MetaStorageManager#get(“foo”, 5) - will return a single value with
> revision 3.
> # MetaStorageManager#get(“foo”, 6) - will return a single value with
> revision 3.
> # MetaStorageManager#get(“bar”, 1) - a *CompactedException* will be thrown.
> # MetaStorageManager#get(“bar”, 5) - a *CompactedException* will be thrown.
> # MetaStorageManager#get(“foo”, 6) - will return an empty value.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)