[
https://issues.apache.org/jira/browse/IGNITE-23286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-23286:
-------------------------------------
Description:
Add CompactedException throwing for MetaStorageManager#getLocally
We need to add throwing
*org.apache.ignite.internal.metastorage.exceptions.CompactedException* for
*org.apache.ignite.internal.metastorage.MetaStorageManager#getLocally(byte[],
long, long)*.
Such method will throw a *CompactedException*:
# If there are no required revisions in the requested range and the lower bound
is less than or equal to the already compacted one.
Let's look at examples.
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#getLocally(“foo”, 1, 1) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“foo”, 1, 2) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“foo”, 2, 3) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“foo”, 3, 6) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“foo”, 5, 6) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“bar”, 1, 2) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“bar”, 3, 5) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“bar”, 6, 7) - will return an empty list.
was:
Add CompactedException throwing for MetaStorageManager#getLocally
We need to add throwing
*org.apache.ignite.internal.metastorage.exceptions.CompactedException* for
*org.apache.ignite.internal.metastorage.MetaStorageManager#getLocally(byte[],
long, long)*.
Such method will throw a *CompactedException*:
# The key exists and either both requested boundary revisions or only the lower
one have already been compacted
# The key does not exist and any of the requested boundary revisions have
already been compacted.
Let's look at examples.
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#getLocally(“foo”, 1, 1) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“foo”, 1, 2) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“foo”, 2, 3) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“foo”, 3, 6) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“foo”, 5, 6) - will return a single value with
revision 3.
# MetaStorageManager#getLocally(“bar”, 1, 2) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“bar”, 3, 5) - a CompactedException will be
thrown.
# MetaStorageManager#getLocally(“bar”, 6, 7) - will return an empty list.
> Add CompactedException throwing for MetaStorageManager#getLocally
> -----------------------------------------------------------------
>
> Key: IGNITE-23286
> URL: https://issues.apache.org/jira/browse/IGNITE-23286
> Project: Ignite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Add CompactedException throwing for MetaStorageManager#getLocally
> We need to add throwing
> *org.apache.ignite.internal.metastorage.exceptions.CompactedException* for
> *org.apache.ignite.internal.metastorage.MetaStorageManager#getLocally(byte[],
> long, long)*.
> Such method will throw a *CompactedException*:
> # If there are no required revisions in the requested range and the lower
> bound is less than or equal to the already compacted one.
> Let's look at examples.
> 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#getLocally(“foo”, 1, 1) - a CompactedException will be
> thrown.
> # MetaStorageManager#getLocally(“foo”, 1, 2) - a CompactedException will be
> thrown.
> # MetaStorageManager#getLocally(“foo”, 2, 3) - will return a single value
> with revision 3.
> # MetaStorageManager#getLocally(“foo”, 3, 6) - will return a single value
> with revision 3.
> # MetaStorageManager#getLocally(“foo”, 5, 6) - will return a single value
> with revision 3.
> # MetaStorageManager#getLocally(“bar”, 1, 2) - a CompactedException will be
> thrown.
> # MetaStorageManager#getLocally(“bar”, 3, 5) - a CompactedException will be
> thrown.
> # MetaStorageManager#getLocally(“bar”, 6, 7) - will return an empty list.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)