[ 
https://issues.apache.org/jira/browse/IGNITE-19466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Uttsel updated IGNITE-19466:
-----------------------------------
    Description: 
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 is a table creation 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 and other components.
h3. *Implementation Notes*

In case a table creation when the data nodes values of the zone is empty 
createTablePartitionsLocally method receives an empty newPartAssignment. So it 
is not possible to do startRaftGroupNode without peers. Need to skip start a 
raft group and other components if the data nodes is empty.

  was:
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 is a table creation 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 and other components.

Start raft groups and other components when the data nodes value is updated.
h3. *Implementation Notes*

In case a table creation when the data nodes values of the zone is empty 
createTablePartitionsLocally method receives an empty newPartAssignment. So it 
is not possible to do startRaftGroupNode without peers. Need to skip start a 
raft group and other components if the data nodes is empty.


> 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 is a table creation 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 and other components.
> h3. *Implementation Notes*
> In case a table creation when the data nodes values of the zone is empty 
> createTablePartitionsLocally method receives an empty newPartAssignment. So 
> it is not possible to do startRaftGroupNode without peers. Need to skip start 
> a raft group and other components if the data nodes is empty.



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

Reply via email to