Hi Eduard, Can we just change cache parameters after calling cache() or getOrCreateCache() by user? The method is blocked until restart finished.
We can set up new cache parameters according to the provided configuration. If it is not possible to change some parameter, a method will fail. I guess it would be the easiest way for users. So do we need a new method? Sincerely, Dmitriy Pavlov ср, 21 нояб. 2018 г. в 16:48, Eduard Shangareev <eduard.shangar...@gmail.com >: > Igniters, > > I propose new public API to change the cache configuration of persistent > caches with keeping data. > > It would look like: > > Ignite ignite = ...; > ignite.restartCaches(cfg1, ... cfgN); > > where cfgX is a new cache configuration, which contains the name of an > existing persistent cache. > > The obvious limitation: > - affinity key mapping couldn't be changed; > - count of partitions couldn't be changed; > - MVCC couldn't be turned off/on; > - persistent couldn't be turned off; > - group settings couldn't be changed (group name); > - if cache belongs to group it's needed to restart all of them. > > Failure scenario is the crucial thing (and most difficult): > - initiator fail; > - cluster restart at any stage; > - joining/starting offline nodes. > > Some thoughts about implementation: > - stop cache with destroy=false; > - start cache dynamically with new configuration; > - if indexes settings changed - remove index.bin to start indexation; > - change blt-history when start cache initiated to not allow join nodes > with old configuration; > - use restartId (IGNITE-8911) to not allow to start cache in between. > > Your thoughts? Would it be a useful feature? >