问题
Ignite 2.8.0, I enable persistent, code like this:
IgniteConfiguration igniteCfg = new IgniteConfiguration();
//igniteCfg.setClientMode(true);
DataStorageConfiguration dataStorageCfg = new DataStorageConfiguration();
dataStorageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
igniteCfg.setDataStorageConfiguration(dataStorageCfg);
Ignite ignite = Ignition.start(igniteCfg);
Then some exception like below:
Caused by: class org.apache.ignite.spi.IgniteSpiException: Joining persistence node to in-memory cluster couldn't be allowed due to baseline auto-adjust is enabled and timeout equal to 0
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.checkFailedError(TcpDiscoverySpi.java:1997)
at org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:1116)
at org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:427)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:2099)
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:297)
... 15 more
Anyony can help me?
Thanks.
回答1:
After starting first node, invoke ignite.cluster().baselineAutoAdjustEnabled(false)
You can also use bin/control.(sh|bat) --baseline auto_adjust [disable|enable] [timeout <timeoutMillis>] [--yes]
Please note that we don't recommend running mixed persistent~non-persistent clusters since they see very few testing. If you must, make sure that data regions have the same persistenceEnabled settings on all nodes.
来源:https://stackoverflow.com/questions/61266725/how-to-disable-ignite-baseline-auto-just