Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0.0
-
None
-
None
-
2022-12-ConfigNode
Description
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:
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"));
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.