[ https://issues.apache.org/jira/browse/IGNITE-23283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirill Tkalenko updated IGNITE-23283: ------------------------------------- Description: We need to add throwing *org.apache.ignite.internal.metastorage.exceptions.CompactedException* for single read methods for metastorage methods: * 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 in the metastorage. 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#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. was: We need to add throwing *org.apache.ignite.internal.metastorage.exceptions.CompactedException* on single read methods for metastorage methods: * 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 in the metastorage. 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#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. > 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 > Priority: Major > Labels: ignite-3 > > We need to add throwing > *org.apache.ignite.internal.metastorage.exceptions.CompactedException* for > single read methods for metastorage methods: > * > 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 in the metastorage. > 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#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)