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

Mirza Aliev edited comment on IGNITE-21859 at 4/8/24 8:21 AM:
--------------------------------------------------------------

The root cause of this problem is the way how the default zone is created. It 
is just injected to the Catalog constructor and is not created through the 
common flow of Catalog entity creation, hence Catalog with this default zone is 
not saved in the meta storage on the initialisation phase and default zone 
descriptor doesn't have correct {{CatalogObjectDescriptor#updateToken()}}. I 
expect this bug is being fixed in the default zone refactoring epic 
automatically because the initialisation of the default zone will be changed   
https://issues.apache.org/jira/browse/IGNITE-20613


was (Author: maliev):
The root cause of this problem is the way how the default zone is created. It 
is just injected to the Catalog constructor and is not created through the 
common flow of Catalog entity creation, hence Catalog with this default zone is 
not saved in the meta storage on the initialisation phase and default zone 
descriptor doesn't have correct {{CatalogObjectDescriptor#updateToken()}}. I 
expect this bug is being fixed in the default zone refactoring epic 
https://issues.apache.org/jira/browse/IGNITE-20613

> Causality token stays 0 for default zone
> ----------------------------------------
>
>                 Key: IGNITE-21859
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21859
>             Project: Ignite
>          Issue Type: Task
>    Affects Versions: 3.0.0-beta1
>            Reporter: Ivan Zlenko
>            Priority: Major
>              Labels: ignite-3
>
> We have a problem where if no alter or other action was performed on default 
> zone causality token in CatalogZoneDescriptor will remain 0. 
> It will cause an error on any attempt of rebalacing any tables in that zone:
> {code}
> [2024-03-27T14:27:22,231][ERROR][%icbt_tacwdws_0%rebalance-scheduler-18][DistributionZoneRebalanceEngine]
>  Failed to update stable keys for tables [[TESTTABLE]]
> {code}
> If we will add stacktrace to output we will get following:
> {code}
> [2024-03-27T14:27:22,231][ERROR][%icbt_tacwdws_0%rebalance-scheduler-13][DistributionZoneRebalanceEngine]
>  CATCH, 
>  java.lang.IllegalArgumentException: causalityToken must be greater then zero 
> [causalityToken=0"
>       at 
> org.apache.ignite.internal.distributionzones.causalitydatanodes.CausalityDataNodesEngine.dataNodes(CausalityDataNodesEngine.java:139)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at 
> org.apache.ignite.internal.distributionzones.DistributionZoneManager.dataNodes(DistributionZoneManager.java:324)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at 
> org.apache.ignite.internal.distributionzones.rebalance.DistributionZoneRebalanceEngine.calculateAssignments(DistributionZoneRebalanceEngine.java:346)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at 
> org.apache.ignite.internal.distributionzones.rebalance.RebalanceRaftGroupEventsListener.doStableKeySwitch(RebalanceRaftGroupEventsListener.java:408)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at 
> org.apache.ignite.internal.distributionzones.rebalance.DistributionZoneRebalanceEngine$3.lambda$onUpdate$0(DistributionZoneRebalanceEngine.java:294)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at java.base/java.util.HashMap.forEach(HashMap.java:1337) ~[?:?]
>       at 
> org.apache.ignite.internal.distributionzones.rebalance.DistributionZoneRebalanceEngine$3.lambda$onUpdate$1(DistributionZoneRebalanceEngine.java:293)
>  ~[ignite-distribution-zones-9.0.127-SNAPSHOT.jar:?]
>       at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>  [?:?]
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
> [?:?]
>       at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
>  [?:?]
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>  [?:?]
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>  [?:?]
>       at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
> {code}
> The workaround is creating a zone and specifying this zone to table. 
> Also wouldn't be a bad idea to print stacktrace for  "Failed to update stable 
> keys for tables" at least on DEBUG log level. 



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

Reply via email to