You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2025/08/06 11:28:00 UTC
[jira] [Updated] (IGNITE-25623) Reliable destruction of evicted partition replicas
[ https://issues.apache.org/jira/browse/IGNITE-25623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Puchkovskiy updated IGNITE-25623:
---------------------------------------
Description:
When evicting a partition replica from a node, we destroy its storages:
* MV partition storage
* TX state storage
* Raft node storages
Destruction might fail midway. On node recovery, we need to find all partition replicas which destruction was not finished and destroy them. The idea is that all storages will have methods to find non-destroyed partitions; we'll use this information to find the partitions we need to destroy (these are those that, according to the assignments, should not be present on the node, but they are).
* MvTableStorage will need the following method: Set<PartitionId> partitionIdsOnDisk(). Take a look at tableIdsOnDisk() for reference.
** Pagemem-based storage will simply scan its FS directory
** RocksDB-based storage will scan the meta column family
* TxStateStorage will need the following method: Set<PartitionId> partitionIdsOnDisk() working in the same way as RocksDB-based storage above
* For Raft-based storages, a scanning method added in IGNITE-25621 could be used
On node recovery, we could do the following:
# expectedPartitionIds = findExpectedPartitionIds() (this finds IDs of all partitions which replicas are expected to exist on this node)
# For each on-disk partitionId in StorageEngine (across all StorageEngines), if partitionId is not in expectedPartitionIds, its storage is destroyed (we will need to add a method to destroy just one partition MV storage to StorageEngine)
# For each on-disk partitionId in TxStateRocksDbSharedStorage, if partitionId is not in expectedPartitionIds, its storage is destroyed (we will need to add a method to destroy just one partition TX storage to TxStateRocksDbSharedStorage)
# For each on-disk partitionId in ReplicaManager, if partitionId is not in expectedPartitionIds, its storage is destroyed
was:
When evicting a partition replica from a node, we destroy its storages:
* MV partition storage
* TX state storage
* Raft node storages
Destruction might fail midway. On node recovery, we need to find all partition replicas which destruction was not finished and destroy them. The idea is that all storages will have methods to find non-destroyed partitions; we'll use this information to find the partitions we need to destroy (these are those that, according to the assignments, should not be present on the node, but they are).
* MvTableStorage will need the following method: Set<Integer> nonDestroyedPartitions()
** Pagemem-based storage will simply scan its FS directory
** RocksDB-based storage will probably need to have an explicit list of non-destroyed partitions in a meta column family. On first startup on a node with an old PDS we'll need to do some kind of a scan to find those partitions
* TxStateStorage will need the following method: Set<Integer> nonDestroyedPartitions()
** Same concerns as RocksDB-based impl above
* For Raft-based storages, a scanning method added in IGNITE-25621 could be used
> Reliable destruction of evicted partition replicas
> --------------------------------------------------
>
> Key: IGNITE-25623
> URL: https://issues.apache.org/jira/browse/IGNITE-25623
> Project: Ignite
> Issue Type: Improvement
> Reporter: Roman Puchkovskiy
> Priority: Major
> Labels: ignite-3
>
> When evicting a partition replica from a node, we destroy its storages:
> * MV partition storage
> * TX state storage
> * Raft node storages
> Destruction might fail midway. On node recovery, we need to find all partition replicas which destruction was not finished and destroy them. The idea is that all storages will have methods to find non-destroyed partitions; we'll use this information to find the partitions we need to destroy (these are those that, according to the assignments, should not be present on the node, but they are).
> * MvTableStorage will need the following method: Set<PartitionId> partitionIdsOnDisk(). Take a look at tableIdsOnDisk() for reference.
> ** Pagemem-based storage will simply scan its FS directory
> ** RocksDB-based storage will scan the meta column family
> * TxStateStorage will need the following method: Set<PartitionId> partitionIdsOnDisk() working in the same way as RocksDB-based storage above
> * For Raft-based storages, a scanning method added in IGNITE-25621 could be used
> On node recovery, we could do the following:
> # expectedPartitionIds = findExpectedPartitionIds() (this finds IDs of all partitions which replicas are expected to exist on this node)
> # For each on-disk partitionId in StorageEngine (across all StorageEngines), if partitionId is not in expectedPartitionIds, its storage is destroyed (we will need to add a method to destroy just one partition MV storage to StorageEngine)
> # For each on-disk partitionId in TxStateRocksDbSharedStorage, if partitionId is not in expectedPartitionIds, its storage is destroyed (we will need to add a method to destroy just one partition TX storage to TxStateRocksDbSharedStorage)
> # For each on-disk partitionId in ReplicaManager, if partitionId is not in expectedPartitionIds, its storage is destroyed
--
This message was sent by Atlassian Jira
(v8.20.10#820010)