`contain` function might not suitable to assert that "local node is in partitionTables"
- 主要言語
- Java
- スター
- 6.4k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 115
説明
**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
コントリビューションガイド
調査の方向性
cluster/src/main/java/org/apache/iotdb/cluster/ClusterIoTDB.java の 411-423 行付近にある包含チェックと、cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterNode.java の 56-62 行付近にあるノードフィールドを読みます。cluster と server を起動して終了する、報告された一連の手順を再現し、その後、異なる nodeIdentifier の値でも包含チェックを満たすべきかどうかを判断してください。報告された start-server エラーがこの有効なノード状態を拒否しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases, distributed-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100