`contain` function might not suitable to assert that "local node is in partitionTables"
- Lenguaje dominante
- Java
- Estrellas
- 6.4k
- Forks
- 1.2k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 115
Descripción
**Describe the bug**
After updating 0.12.4 to 0.13.0, I make a mistake and run start-server rather than start-node.
Then I see an error: `All nodes in partitionTables must contain local node in start-server mode. `
Which appeared in line 416 https://github.com/apache/iotdb/blob/ac51b0802ac5d016f028fbfe829f8b8ab530740e/cluster/src/main/java/org/apache/iotdb/cluster/ClusterIoTDB.java#L411-L423
I checked the error log and find that the node has only one parameter which is different from nodes in `metaGroupMember`, `nodeIdentifier`.
In https://github.com/apache/iotdb/blob/ac51b0802ac5d016f028fbfe829f8b8ab530740e/cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterNode.java#L56-L62
I got `nodeIdentifier` is not parameter which should be the same. And I cannot find any place to change it, it's used for thrift. But is it necessary to keep the parameter `nodeIdentifier` the same?
If not, `contain` function might be rewritten。
**To Reproduce**
Am not really make sure this process will reproduce but am sure to get this error with the following procedure.
1. run start-cluster, then close it
2. run start-server, then close it
3. run start-cluster
4. See error
**Expected behavior**
This node should have been contained in all nodes, although nodeIdentifier is different.
**Desktop (please complete the following information):**
- OS: CentOS7
- Version 0.13.0
Guía de contribución
Línea de trabajo
Lea la comprobación de contención en cluster/src/main/java/org/apache/iotdb/cluster/ClusterIoTDB.java alrededor de las líneas 411-423 y los campos del nodo en cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterNode.java alrededor de las líneas 56-62. Reproduzca la secuencia indicada de iniciar y cerrar el cluster y el server, y determine después si unos valores de nodeIdentifier diferentes deberían seguir satisfaciendo la comprobación de contención. Se considera terminado cuando el error de start-server indicado ya no rechaza este estado de nodo válido.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- databases, distributed-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 28/100