Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[remove datanode] Procedure no longer acquires node lock #14115

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

Pengzna
Copy link
Collaborator

@Pengzna Pengzna commented Nov 18, 2024

as title.

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~

@wangchao316
Copy link
Member

hi , why do no need node lock? if have some addnodeprocedure perform now, our remove other node, whether is effect?

@OneSizeFitsQuorum
Copy link
Contributor

| hi , why do no need node lock? if have some addnodeprocedure perform now, our remove other node, whether is effect?

Hi, chao, this is because we have do check before executing RemoveDataNode Procedure(you could see the code in https://github.com/apache/iotdb/blob/master/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java#L619-L725).

Currently, only one removeDataNode task is allowed globally, so there is no need for additional concurrency control during procedure execution, otherwise it may cause some mutual blocking with pipe

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

@OneSizeFitsQuorum OneSizeFitsQuorum merged commit 6242d93 into apache:master Nov 22, 2024
30 of 32 checks passed
@Pengzna
Copy link
Collaborator Author

Pengzna commented Nov 22, 2024

hi , why do no need node lock? if have some addnodeprocedure perform now, our remove other node, whether is effect?

hi @wangchao316 , sorry for replying late, I just saw this message. As @OneSizeFitsQuorum said, the upper layer of the procedure has been guaranteed to be safe, so the lock here is unnecessary because it may block other procedures.

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