Andrey, I believe that we already have all machinery to do migration safe. See for example org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage#init and org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.TmpStorage. This machinery was introduced for slightly different task, but we can reuse this for the current purpose.
пн, 20 дек. 2021 г. в 11:53, Mikhail Petrov <pmgheap....@gmail.com>: > Thank you all for your replies! > I got the idea and agreed with it. Based on the results of the > discussion, I have filed a ticket [1]. > I will try to investigate it. > > [1] - https://issues.apache.org/jira/browse/IGNITE-16157 > > On 16.12.2021 20:11, Ivan Daschinsky wrote: > > Andrey, agree with you, good point. > > > > чт, 16 дек. 2021 г., 16:27 Andrey Mashenkov <andrey.mashen...@gmail.com > >: > > > >> Guys, > >> > >> I like the idea with a flag, but for a different purpose. > >> I think it is easy to detect the issue (using the flag) when > >> metastorage was created on a new version with a fixed charset, or on an > >> older version with the user-defined default. > >> Regarding the flag, we can choose a new strategy forcing UTF-8, or > fallback > >> to the old one with defaultCharset and print a warning and > recommendation > >> in log. > >> > >> Adding any compatibility stuff is absolutely error-prone because if you > >> fail in the middle of restoring process, you will get broken metastorage > >> with keys in different charsets. > >> At this point, there is no way to detect broken keys anymore. > >> > -- Sincerely yours, Ivan Daschinskiy