I enabled Ignite Persistence. Following is my configuration:
// New Data Region
> DataStorageConfiguration storageCfgPersistence = new
> DataStorageConfiguration();
> DataRegionConfiguration regionCfg = new DataRegionConfiguration();
> regionCfg.setName("Persistence");
> regionCfg.setInitialSize(100L * 1024 * 1024);
> regionCfg.setMaxSize(500L * 1024 * 1024);
> regionCfg.setPersistenceEnabled(true);
> storageCfgPersistence.setDataRegionConfigurations(regionCfg);
> cfg.setDataStorageConfiguration(storageCfgPersistence);
>
>
I am facing 2 problems after enabling Ignite persistence:
1 The applications boots up fine with no error but its stuck at that point.
It doesn't perform any action that its supposed to perform. I know this
because as soon the Ignite completes boot up my application logs starts to
print on the console but with persistence on, nothing is printed. Following
is the output when the node boots up:
2018-09-19 10:53:58.957 WARN 6032 --- [-worker-#42%cm%]
>> o.a.i.i.p.c.p.file.FilePageStoreManager : Persistence store directory is
>> in the temp directory and may be cleaned.To avoid this set "IGNITE_HOME"
>> environment variable properly or change location of persistence directories
>> in data storage configuration (see DataStorageConfiguration#walPath,
>> DataStorageConfiguration#walArchivePath,
>> DataStorageConfiguration#storagePath properties). Current persistence store
>> directory is: [/tmp]
>
> [10:53:59] Performance suggestions for grid 'cm' (fix if possible)
>
> [10:53:59] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
>
> [10:53:59] ^-- Enable G1 Garbage Collector (add '-XX:+UseG1GC' to JVM
>> options)
>
> [10:53:59] ^-- Specify JVM heap max size (add '-Xmx<size>[g|G|m|M|k|K]'
>> to JVM options)
>
> [10:53:59] ^-- Set max direct memory size if getting 'OOME: Direct
>> buffer memory' (add '-XX:MaxDirectMemorySize=<size>[g|G|m|M|k|K]' to JVM
>> options)
>
> [10:53:59] ^-- Disable processing of calls to System.gc() (add
>> '-XX:+DisableExplicitGC' to JVM options)
>
> [10:53:59] Refer to this page for more performance suggestions:
>> https://apacheignite.readme.io/docs/jvm-and-system-tuning
>
> [10:53:59]
>
> [10:53:59] To start Console Management & Monitoring run
>> ignitevisorcmd.{sh|bat}
>
> [10:53:59]
>
> [10:53:59] Ignite node started OK (id=085939f2, instance name=cm)
>
> [10:53:59] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8,
>> offheap=2.8GB, heap=2.6GB]
>
> [10:53:59] ^-- Node [id=085939F2-56B0-42C7-BC17-A7BBC8F000F0,
>> clusterState=INACTIVE]
>
> [10:53:59] ^-- Baseline [id=0, size=1, online=1, offline=0]
>
> [10:53:59] ^-- All baseline nodes are online, will start auto-activation
>
> [10:53:59] Data Regions Configured:
>
>
>
As you can see the baseline topology is configured correctly and cluster is
activated.
2. When I try to kill the application using Ctrl+C, it doesn't work. It
used to work before I enabled Ignite Persistence.
Any clue what might be wrong here?