[ 
https://issues.apache.org/jira/browse/IGNITE-16665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kirill Tkalenko updated IGNITE-16665:
-------------------------------------
    Description: 
Now the group id is calculated as {*}TableView.name().hashCode(){*}, need to 
move it to the config.
See org.apache.ignite.internal.storage.StorageUtils#groupId

Problem:

Currently, persistent storage engines such as *PageMemory* and *RocksDB* use 
the 
*org.apache.ignite.configuration.schemas.table.TableConfigurationSchema#name* 
(as part or all) as the name for the directory in which the data will be 
stored. This does not allow you to rename the table correctly, since the data 
will have to be in the new directory so that it is not lost after restarting 
the node, but it will be in the directory with the old name.

Possible solution:

Do not use the name of the table as the directory name, instead add the 
*org.apache.ignite.configuration.schemas.table.TableConfigurationSchema#id* 
which should never change, and must also be unique.

Please see:
 * *org.apache.ignite.internal.storage.StorageUtils#groupId*
 * 
*org.apache.ignite.internal.storage.pagememory.PersistentPageMemoryTableStorage#start*
 * *org.apache.ignite.internal.storage.rocksdb.RocksDbStorageEngine#createTable*

  was:
Now the group id is calculated as *TableView.name().hashCode()*, need to move 
it to the config.
See org.apache.ignite.internal.storage.StorageUtils#groupId


> [Native Persistence 3.0] Move the group ID to the configuration
> ---------------------------------------------------------------
>
>                 Key: IGNITE-16665
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16665
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Kirill Tkalenko
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-alpha6
>
>
> Now the group id is calculated as {*}TableView.name().hashCode(){*}, need to 
> move it to the config.
> See org.apache.ignite.internal.storage.StorageUtils#groupId
> Problem:
> Currently, persistent storage engines such as *PageMemory* and *RocksDB* use 
> the 
> *org.apache.ignite.configuration.schemas.table.TableConfigurationSchema#name* 
> (as part or all) as the name for the directory in which the data will be 
> stored. This does not allow you to rename the table correctly, since the data 
> will have to be in the new directory so that it is not lost after restarting 
> the node, but it will be in the directory with the old name.
> Possible solution:
> Do not use the name of the table as the directory name, instead add the 
> *org.apache.ignite.configuration.schemas.table.TableConfigurationSchema#id* 
> which should never change, and must also be unique.
> Please see:
>  * *org.apache.ignite.internal.storage.StorageUtils#groupId*
>  * 
> *org.apache.ignite.internal.storage.pagememory.PersistentPageMemoryTableStorage#start*
>  * 
> *org.apache.ignite.internal.storage.rocksdb.RocksDbStorageEngine#createTable*



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to