Dmitry, I seems to me that the algorithm of using different schemes for persistence folder naming is flawe. Why don’t we just name the folder same as consistent ID all the time?
How about the following algorithm of db folder and consistenID generation 1.. If the consistent ID is explicitly set to ABCD then both the ID and the folder name are ABCD 2. If there is no consistentID 2a. If there is an existing, not locked db folder 2aa. If the folder is named nodeXX-UUID then that folder is used and the consistentID is UUID 2ab. If the folder is named ABCD then both the ID and the folder name are ABCD 2b. If there is no existing db folder then both the ID and the folder name are UUID This behavior makes sure that - Going forward, folder name and consistentID are always the same - Existing storages that are used without a consistentID can continue to be used - New storages created without an explicit consistentID can use an explicit consistentID (so, the problem described in IGNITE-11432 will no affect new users) Existing users with existing storages named nodeXX-UUID will continue to be affected by IGNITE-11432, i.e. they will not be able to easily specify their generated consistentID in the configuration. I don’t think that’s critical though – the problem can be resolved by manually renaming directories. Let’s not complicate our API for the sake of resolving an existing issue with a workaround – better to simplify the API and make sure that such problem will not happen again. Also, I assume that the reason behind using a prefix “nodeXX” is to distinguish storage directories from some random trash being in the same folder, but that can be achieved in a different way. E.g. to scan all folders and check their structure, look for a marker file, etc. Thanks, Stan From: Павлухин Иван Sent: 28 февраля 2019 г. 8:03 To: dev@ignite.apache.org Subject: Re: Consistent ID specification from previous random UUID Dmitiy, Could please clarify one thing: 1. Will it be enough to use only storageNodeIndex in order to reuse the same persistence folders when consistentId is auto-generated? E.g. I have a configuration with storageNodeIndex=1 and without explicitly specified consistentId, will the node after restart use the same persistence folder as before restart? Also a side note: > Please share your vision. I'm going to apply this change by lazy consensus in 3 days. What do you mean by "apply"? I have not seen any PR yet. ср, 27 февр. 2019 г. в 21:12, Dmitriy Pavlov <dpav...@apache.org>: > > Hi Igniters, > > I would like to fix the issue > https://issues.apache.org/jira/browse/IGNITE-11432 about specifying some > previous randomly generated UUID as a new consistent ID. Folder generation > algorithm here ( > https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Persistent+Store+-+under+the+hood) > allows two options > -node00+random UUID > - consistendId > > I would like to add to Ignite configuration new property nodeIndex in > addition to consistent Id. New Property will be named as storageNodeIndex, > int, zero-based. > This will add the third option of subfolders processing: > node{storageNodeIndex}+consistentID > > Please share your vision. I'm going to apply this change by lazy consensus > in 3 days. > > Sincerely, > Dmitriy Pavlov -- Best regards, Ivan Pavlukhin