Skip to content

IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode#14814

Merged
OneSizeFitsQuorum merged 8 commits intoapache:masterfrom
liyuheng55555:Working/IoTConsensus-conf-persist-refactor
Feb 17, 2025
Merged

IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode#14814
OneSizeFitsQuorum merged 8 commits intoapache:masterfrom
liyuheng55555:Working/IoTConsensus-conf-persist-refactor

Conversation

@liyuheng55555
Copy link
Collaborator

@liyuheng55555 liyuheng55555 commented Feb 11, 2025

The new resetPeerList interface is super powerful.

Now, IoTConsensus member management can be fully handled by ConfigNode, and DataNode can simply obtain the peer list from ConfigNode during startup (through resetPeerList interface).

Copy link
Collaborator

@HxpSerein HxpSerein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liyuheng55555 liyuheng55555 changed the title IoTConsensus no longer stores the peer list locally on the DataNode 【remember to add Hu to co-arthor and delete this bracket before merge】IoTConsensus no longer stores the peer list locally on the DataNode Feb 13, 2025
Copy link
Collaborator

@Pengzna Pengzna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complete IoTV2 part

path.toString(),
new Peer(consensusGroupId, thisNodeId, thisNode),
new ArrayList<>(),
new TreeSet<>(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use treeset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, duplicates were removed during configuration persistence. Now that the persistence code is gone, a set is used to keep this logic.

TreeSet is used to return a List with a consistent order (for an interface), which I believe is better than the unordered HashSet.

@liyuheng55555 liyuheng55555 changed the title 【remember to add Hu to co-arthor and delete this bracket before merge】IoTConsensus no longer stores the peer list locally on the DataNode 【remember to add Hu and Peng to co-arthor and delete this bracket before merge】IoTConsensus no longer stores the peer list locally on the DataNode Feb 13, 2025
@liyuheng55555 liyuheng55555 changed the title 【remember to add Hu and Peng to co-arthor and delete this bracket before merge】IoTConsensus no longer stores the peer list locally on the DataNode 【remember to add Hu and Peng to co-arthor and delete this bracket before merge】IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode Feb 13, 2025
Copy link
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~
Really Awesome work!

@OneSizeFitsQuorum OneSizeFitsQuorum merged commit 4bd2f25 into apache:master Feb 17, 2025
50 checks passed
liyuheng55555 added a commit to liyuheng55555/iotdb that referenced this pull request Feb 19, 2025
…y on the DataNode (apache#14814)

Co-authored-by: Peng Junzhi <201250214@smail.nju.edu.cn>

Co-authored-by: Xiangpeng Hu <65238551+HxpSerein@users.noreply.github.com>

(cherry picked from commit 4bd2f25)
OneSizeFitsQuorum pushed a commit that referenced this pull request Feb 21, 2025
…he DataNode (#14900)

* IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode (#14814)

Co-authored-by: Peng Junzhi <201250214@smail.nju.edu.cn>

Co-authored-by: Xiangpeng Hu <65238551+HxpSerein@users.noreply.github.com>

(cherry picked from commit 4bd2f25)

* Fix IoTConsensus safe deleted index (#14883)

* done

* move

(cherry picked from commit 9e973b7)

* Fix IoTConsensus safe deleted index again (#14897)

* ?

* spotless

(cherry picked from commit 4aadc09)

* revert iotv2

* fix IT
@liyuheng55555 liyuheng55555 changed the title 【remember to add Hu and Peng to co-arthor and delete this bracket before merge】IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode IoTConsensus and IoTConsensusV2 no longer stores the peer list locally on the DataNode Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants