`contain` function might not suitable to assert that "local node is in partitionTables"
- Langage dominant
- Java
- Étoiles
- 6.4k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 115
Description
**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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Lisez la vérification de contenance dans cluster/src/main/java/org/apache/iotdb/cluster/ClusterIoTDB.java autour des lignes 411-423 ainsi que les champs du nœud dans cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterNode.java autour des lignes 56-62. Reproduisez la séquence signalée de démarrage et de fermeture du cluster et du server, puis déterminez si des valeurs nodeIdentifier différentes devraient tout de même satisfaire la vérification de contenance. C’est terminé lorsque l’erreur start-server signalée ne rejette plus cet état de nœud valide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- databases, distributed-systems
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 28/100