[ 
https://issues.apache.org/jira/browse/IGNITE-19042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702731#comment-17702731
 ] 

Alexander Lapin commented on IGNITE-19042:
------------------------------------------

[~Sergey Uttsel] LGTM, thx!

> NPE on DistributionZoneManager#saveDataNodesToMetaStorageOnScaleUp
> ------------------------------------------------------------------
>
>                 Key: IGNITE-19042
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19042
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Sergey Uttsel
>            Assignee: Sergey Uttsel
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> h3. Motivation
> NullPointerException in log on start the first node in the cluster if 
> DistributionZoneConfigurationSchema#dataNodesAutoAdjustScaleUp and 
> DistributionZoneConfigurationSchema#dataNodesAutoAdjustScaleDown are 0.
> How to reproduce:
>  # Set DistributionZoneConfigurationSchema#dataNodesAutoAdjustScaleUp = 0 and 
> DistributionZoneConfigurationSchema#dataNodesAutoAdjustScaleDown = 0.
>  # Start the test which starts the node. For example 
> ItTablesApiTest#testAddIndex.
>  # See NullPointerException in the log.
> {code:java}
> Caused by: java.lang.NullPointerException     at 
> java.base/java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:108) 
> at org.apache.ignite.internal.util.ByteUtils.fromBytes(ByteUtils.java:152)    
>   at 
> org.apache.ignite.internal.distributionzones.DistributionZoneManager.lambda$saveDataNodesToMetaStorageOnScaleUp$32(DistributionZoneManager.java:1096)
>         at 
> org.apache.ignite.internal.util.IgniteUtils.inBusyLock(IgniteUtils.java:870) 
> at 
> org.apache.ignite.internal.distributionzones.DistributionZoneManager.lambda$saveDataNodesToMetaStorageOnScaleUp$33(DistributionZoneManager.java:1090)
>         at 
> java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
>      ... 13 more {code}
> The root cause is zoneDataNodesKey, zoneScaleUpChangeTriggerKey, 
> zoneScaleDownChangeTriggerKey of zones are not initialized on node start if 
> vaultMgr.get(zonesLogicalTopologyKey()) is null. It's possible for default 
> distribution zone because custom zone the keys initialized in 
> DistributionZoneManager.ZonesConfigurationListener#onCreate.
> *Definition of Done*
> Properly handle non-initialized values of zoneDataNodesKey, 
> zoneScaleUpChangeTriggerKey, zoneScaleDownChangeTriggerKey in 
> DistributionZoneManager#saveDataNodesToMetaStorageOnScaleUp and 
> DistributionZoneManager#
> saveDataNodesToMetaStorageOnScaleDown



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to