[
https://issues.apache.org/jira/browse/IGNITE-19466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mirza Aliev updated IGNITE-19466:
---------------------------------
Labels: ignite-3 tech-debt (was: ignite-3)
> Empty data nodes on table creation
> ----------------------------------
>
> Key: IGNITE-19466
> URL: https://issues.apache.org/jira/browse/IGNITE-19466
> Project: Ignite
> Issue Type: Bug
> Reporter: Sergey Uttsel
> Priority: Major
> Labels: ignite-3, tech-debt
>
> h3. *Motivation*
> After introducing data nodes from DistributionZoneManager on table creation
> it became possible that a table is created with an empty data nodes value and
> therefore with empty assignments. It causes an exceptions likeĀ
> {code:java}
> Caused by: java.lang.AssertionError
> at
> org.apache.ignite.internal.raft.RaftGroupServiceImpl.randomNode(RaftGroupServiceImpl.java:680)
> at
> org.apache.ignite.internal.raft.RaftGroupServiceImpl.randomNode(RaftGroupServiceImpl.java:667)
> at
> org.apache.ignite.internal.raft.RaftGroupServiceImpl.refreshLeader(RaftGroupServiceImpl.java:222)
> at
> org.apache.ignite.internal.raft.RaftGroupServiceImpl.start(RaftGroupServiceImpl.java:178)
> {code}
> because there are an empty peers on RaftGroupServiceImpl#start. The proper
> solution when a table is created with empty peers but remains unusable until
> the data nodes for the zone is updated and RaftGroupServiceImpl is started
> with peers.
> h3. *Definition of Done*
> If the date nodes for the zone are empty, then create a table without a raft
> group other components.
> Start raft groups and other components when the data nodes value is updated.
> h3. *Implementation Notes*
> We have two issues.
> # The first is a table creation when the data nodes values of the zone is
> empty. In this case createTablePartitionsLocally method receives an empty
> newPartAssignment. So it is not possible to do startRaftGroupNode without
> peers. Need to skip it if the data nodes is empty.
> # The second is starting raft groups when data nodes value is updated. In
> this case handleChangePendingAssignmentEvent receives an empty
> stableAssignments and not empty pendingAssignments. Currently
> handleChangePendingAssignmentEvent invokes startRaftGroupNode to start raft
> group node with stable assignment and then invokes changePeersAsync with
> pendingAssignments. We need to skip it if stableAssignments is empty and
> start new raft group with pendingAssignments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)