apache / apache/iotdb

`contain` function might not suitable to assert that "local node is in partitionTables"

Open
#5,600 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
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

Contributor guide

Open the contributing guide

Research direction

Read the containment check in cluster/src/main/java/org/apache/iotdb/cluster/ClusterIoTDB.java around lines 411-423 and the node fields in cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterNode.java around lines 56-62. Reproduce the reported sequence of starting and closing the cluster and server, then determine whether differing nodeIdentifier values should still satisfy the containment check. Done means the reported start-server error no longer rejects this valid node state.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.