[
https://issues.apache.org/jira/browse/IGNITE-24371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mikhail Efremov updated IGNITE-24371:
-------------------------------------
Description:
*Description*
As it was refined in IGNITE-24556 for a zone with any persistent storage we
consider {{isVolatile}} as {{false}} and iif all zone's storages are volatile
then {{isVolatile}} is {{true}}. Only in the last case we create both volatile
RAFT and table storages. Otherwise we create persistent RAFT storage and a
table storage depends on its storage profile.
This changes demands to pass {{DataStorageManager}} component to
{{PartitionReplicaLifecycleManager}} and check that zone is volatile. Zone is
volatile iif all storage profiles that may be checked from zone description,
are volatile. A storage profile's volatility may be checked through
{{DataStorageManager#engineByStorageProfile}}, so the draft solution is:
{code:java}
boolean isVolatileZone = zoneDescriptor.storageProfiles()
.profiles()
.stream()
.map(CatalogStorageProfileDescriptor::storageProfile)
.map(dataStorageManager::engineByStorageProfile)
.filter(Objects::nonNull)
.allMatch(StorageEngine::isVolatile);
{code}
This flag should be passed to zone replica starting process inside
{{PartitionReplicaLifecycleManager#createZonePartitionReplicationNode}} in
{{replicaMgr#startReplica}} call with the corresponding TODO commentary.
Last but not least we have to make tests that checks that volatile storages
both for a RAFT node and a table are created and able to process commands
during a stable cluster. Tests should use both mixed and volatile zone profiles
scenarios.
*Motivation*
We should provide compatible behavior for in-memory storages for zone
colocation.
*Definition of done*
# The flag {{isVolatile}} now computes based on zone's storage profiles.
# For this purpose the {{DataStorageManager}} is passed to
{{PartitionReplicaLifecycleManager}}.
# Test that check mixed profiles is written:
## check for persistent RAFT storage is presented;
## check for volatile table storage is presented;
## check for persistent table storage is presented;
## check for successful read-write commands for both table storages are
presented.
# Test that check volatile-only zone profile is written:
## check for volatile RAFT storage is presented;
## check for volatile table storage is presented;
## check for successful read-write commands for volatile table storage is
presented.
was:Currently, false is always passed, but for volatile engines true must be
passed
> Pass isVolatile flag when creating a zone partition
> ---------------------------------------------------
>
> Key: IGNITE-24371
> URL: https://issues.apache.org/jira/browse/IGNITE-24371
> Project: Ignite
> Issue Type: Improvement
> Reporter: Roman Puchkovskiy
> Priority: Major
> Labels: ignite-3
>
> *Description*
>
> As it was refined in IGNITE-24556 for a zone with any persistent storage we
> consider {{isVolatile}} as {{false}} and iif all zone's storages are volatile
> then {{isVolatile}} is {{true}}. Only in the last case we create both
> volatile RAFT and table storages. Otherwise we create persistent RAFT storage
> and a table storage depends on its storage profile.
> This changes demands to pass {{DataStorageManager}} component to
> {{PartitionReplicaLifecycleManager}} and check that zone is volatile. Zone is
> volatile iif all storage profiles that may be checked from zone description,
> are volatile. A storage profile's volatility may be checked through
> {{DataStorageManager#engineByStorageProfile}}, so the draft solution is:
> {code:java}
> boolean isVolatileZone = zoneDescriptor.storageProfiles()
> .profiles()
> .stream()
> .map(CatalogStorageProfileDescriptor::storageProfile)
> .map(dataStorageManager::engineByStorageProfile)
> .filter(Objects::nonNull)
> .allMatch(StorageEngine::isVolatile);
> {code}
> This flag should be passed to zone replica starting process inside
> {{PartitionReplicaLifecycleManager#createZonePartitionReplicationNode}} in
> {{replicaMgr#startReplica}} call with the corresponding TODO commentary.
> Last but not least we have to make tests that checks that volatile storages
> both for a RAFT node and a table are created and able to process commands
> during a stable cluster. Tests should use both mixed and volatile zone
> profiles scenarios.
> *Motivation*
> We should provide compatible behavior for in-memory storages for zone
> colocation.
> *Definition of done*
> # The flag {{isVolatile}} now computes based on zone's storage profiles.
> # For this purpose the {{DataStorageManager}} is passed to
> {{PartitionReplicaLifecycleManager}}.
> # Test that check mixed profiles is written:
> ## check for persistent RAFT storage is presented;
> ## check for volatile table storage is presented;
> ## check for persistent table storage is presented;
> ## check for successful read-write commands for both table storages are
> presented.
> # Test that check volatile-only zone profile is written:
> ## check for volatile RAFT storage is presented;
> ## check for volatile table storage is presented;
> ## check for successful read-write commands for volatile table storage is
> presented.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)