Skip to content

Conversation

@swuferhong
Copy link
Contributor

Purpose

Linked issue: #1371

This pr is aims to introduce new rebalance API. For more details, please refer to https://cwiki.apache.org/confluence/display/FLUSS/FIP-8%3A+Support+Cluster+Reblance

Brief change log

Tests

API and Format

Documentation

@swuferhong swuferhong linked an issue Jul 22, 2025 that may be closed by this pull request
2 tasks
@swuferhong swuferhong force-pushed the reblance-api branch 2 times, most recently from 367414b to c70310a Compare July 22, 2025 07:12
@swuferhong swuferhong force-pushed the reblance-api branch 7 times, most recently from ac2f7eb to 8b604e4 Compare July 24, 2025 01:12
@swuferhong swuferhong force-pushed the reblance-api branch 2 times, most recently from 291382b to edb52c5 Compare August 29, 2025 04:26
@polyzos polyzos force-pushed the main branch 3 times, most recently from d88c76c to 434a4f4 Compare August 31, 2025 15:13
@swuferhong swuferhong force-pushed the reblance-api branch 2 times, most recently from 7ab4dcb to a60f459 Compare September 3, 2025 08:28
Copy link
Contributor

@LiebingYu LiebingYu left a comment

Choose a reason for hiding this comment

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

Left some minor comments.

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

Thanks @swuferhong , I left some comments.

return getOrEmpty(path).map(RebalanceZNode::decode);
}

public void deleteRebalancePlan() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

I doubt whether we should delete the rebalance node on ZK. If we delete it once the rebalance successfully finished, we don't have the ability to respond users the status of the rebalance plan.

Maybe we can just soft delete the rebalance node by mark the rebalance plan is cancelled or failed or completed (the RebalanceStatus), so listRebalanceProgress still work after the rebalance finished, and can be overriden by next rebalance task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with your changes. I've removed the deleteRebalancePlan method and added a new updateRebalancePlan method. Additionally, I introduced a new field rebalance_status in the RebalancePlan. Now, each time we check the status to determine whether the rebalance has completed or already failed.

@swuferhong
Copy link
Contributor Author

@wuchong comments addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce new rebalance API

3 participants