I have configured segmentationResolver, and segmentation policy specified as RESTART_JVM, and segmentationCheckFreq set to ‘0’, means check segmentation based on the topology changes.
But, this scenario is crashing.
In GridDiscoveryManager.java:3130, segmentationcheck is scheduled only when the resolvers configured
”’
case EVT_NODE_LEFT: {
// Check only if resolvers were configured.
if (hasRslvrs)
segChkWrk.scheduleSegmentCheck();
”’
but, the ‘segChkWrk’ object is initialized only when segmentatinCheckFreq is set to non-zero. Due to this above code line:3033 crashes.
line:1087
”’
// Start segment check worker only if frequency is greater than 0.
if (hasRslvrs && segChkFreq > 0) {
segChkWrk = new SegmentCheckWorker();
segChkThread = new IgniteThread(segChkWrk);
”’
How to reproduce:
- Configure segmentation resolvers
- set segmentationCheckFreq to 0 (zero)
- stop one node. Other nodes will crash.
In a 5 node cluster, if i stop one node, other nodes also shutting down with null pointer exception.
”’
2024-06-20 16:06:51,030 UTC+0530 ERROR [disco-event-worker-#45%as%] org.apache.ignite.internal.managers.discovery.GridDiscoveryManager — Exception in discovery event worker thread.
java.lang.NullPointerException: Cannot invoke “org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$SegmentCheckWorker.scheduleSegmentCheck()” because the return value of “org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.access$11600(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager)” is null
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body0(GridDiscoveryManager.java:3133) ~[ignite-core-2.16.0.jar:2.16.0]
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body(GridDiscoveryManager.java:3060) ~[ignite-core-2.16.0.jar:2.16.0]
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) ~[ignite-core-2.16.0.jar:2.16.0]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
2024-06-20 16:06:51,711 UTC+0530 ERROR [disco-event-worker-#45%as%] org.apache.ignite.logger.jcl.JclLogger — Critical system error detected. Will be handled accordingly to configured handler [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet []]], failureCtx=FailureContext [type=SYSTEM_WORKER_TERMINATION, err=java.lang.NullPointerException: Cannot invoke “o.a.i.i.managers.discovery.GridDiscoveryManager$SegmentCheckWorker.scheduleSegmentCheck()” because the return value of “o.a.i.i.managers.discovery.GridDiscoveryManager.access$11600(o.a.i.i.managers.discovery.GridDiscoveryManager)” is null]]
java.lang.NullPointerException: Cannot invoke “org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$SegmentCheckWorker.scheduleSegmentCheck()” because the return value of “org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.access$11600(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager)” is null
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body0(GridDiscoveryManager.java:3133) ~[ignite-core-2.16.0.jar:2.16.0]
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryWorker.body(GridDiscoveryManager.java:3060) ~[ignite-core-2.16.0.jar:2.16.0]
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) ~[ignite-core-2.16.0.jar:2.16.0]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
”’