Bug in GridDiscoveryManager.java (2.16.0)) when segmentationResolvers configured with segmentationCheckFrequency = 0
lakshmikanthGIT opened this issue · 0 comments
I have configured a segmentationResolver, 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);**
'''
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) ~[?:?]