[ https://issues.apache.org/jira/browse/IOTDB-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gaofei Cao reassigned IOTDB-5218: --------------------------------- Assignee: Yongzao Dan (was: Gaofei Cao) > DataNode should marked started successfully until the region is assigned > ------------------------------------------------------------------------- > > Key: IOTDB-5218 > URL: https://issues.apache.org/jira/browse/IOTDB-5218 > Project: Apache IoTDB > Issue Type: Bug > Affects Versions: 1.0.0 > Reporter: Xiangdong Huang > Assignee: Yongzao Dan > Priority: Major > Labels: DataNode > > A scenario: > * start a configNode > * start a datanode immediatelly > * write data immediatelly > Then there will be error: > org.apache.iotdb.commons.exception.IoTDBException: ConfigNode failed to > extend Region because there are not enough DataNodes > > Can use the following codes to reproduct: > {code:java} > IoTDBService service = IoTDBService.getInstance(); > service.startConfigNodeService(); > IoTDBService.getInstance().startDataNodeService(); > long time = System.currentTimeMillis(); > IoTDBService.getInstance().insertRecord("root.test.d1", time, > Collections.singletonList("s1"), Collections.singletonList("1.0")); {code} > IoTDBService is a wrapper to wrap CongfigNode's main() and DataNode's main(). > > IMO, the datanode server is really ready only when there is a region for it. > Besides, if the process is time consuming, we can add a status check method > to check whether datanode is ready. -- This message was sent by Atlassian Jira (v8.20.10#820010)