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

[#1401] feat:(dashboard): Support deleting lost shuffle servers #1870

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

yl09099
Copy link
Contributor

@yl09099 yl09099 commented Jul 7, 2024

What changes were proposed in this pull request?

Support deleting lost shuffle servers:
If some shuffle servers are lost, they need to go offline and the Coordinator has been in the lost state.
Add the delete function to delete these servers in the memory.

image

Why are the changes needed?

Fix: #1401

Does this PR introduce any user-facing change?

Yes.

How was this patch tested?

Add UT.

Copy link

github-actions bot commented Jul 7, 2024

Test Results

 2 657 files  ±0   2 657 suites  ±0   5h 31m 1s ⏱️ -7s
   946 tests ±0     945 ✅ ±0   1 💤 ±0  0 ❌ ±0 
11 799 runs  ±0  11 784 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit fd9428a. ± Comparison against base commit c48af78.

♻️ This comment has been updated with latest results.

@yl09099 yl09099 force-pushed the uniffle-1869 branch 2 times, most recently from 95953b9 to 7283732 Compare July 7, 2024 08:20
@yl09099
Copy link
Contributor Author

yl09099 commented Jul 7, 2024

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 53.19%. Comparing base (dddcced) to head (322e9eb).
Report is 36 commits behind head on master.

Files Patch % Lines
...ache/uniffle/coordinator/SimpleClusterManager.java 0.00% 9 Missing ⚠️
...iffle/coordinator/web/resource/ServerResource.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1870      +/-   ##
============================================
- Coverage     53.53%   53.19%   -0.35%     
- Complexity     2356     2989     +633     
============================================
  Files           368      446      +78     
  Lines         16852    24381    +7529     
  Branches       1540     2270     +730     
============================================
+ Hits           9022    12969    +3947     
- Misses         7303    10618    +3315     
- Partials        527      794     +267     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yl09099 yl09099 force-pushed the uniffle-1869 branch 2 times, most recently from c481092 to 322e9eb Compare July 7, 2024 14:23
@rickyma rickyma requested a review from xianjingfeng July 7, 2024 18:16
@rickyma
Copy link
Contributor

rickyma commented Jul 10, 2024

ping @xianjingfeng ~

Comment on lines 317 to 326
if (serverId != null && !serverId.equalsIgnoreCase("")) {
Iterator<ServerNode> lostNodeIter = lostNodes.iterator();
while (lostNodeIter.hasNext()) {
ServerNode node = lostNodeIter.next();
if (serverId.equalsIgnoreCase(node.getId())) {
lostNodes.remove(node);
return true;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (serverId != null && !serverId.equalsIgnoreCase("")) {
Iterator<ServerNode> lostNodeIter = lostNodes.iterator();
while (lostNodeIter.hasNext()) {
ServerNode node = lostNodeIter.next();
if (serverId.equalsIgnoreCase(node.getId())) {
lostNodes.remove(node);
return true;
}
}
}
if (StringUtils.isNotBlank(serverId)) {
lostNodes.remove(new ServerNode(serverId));
}

Maybe this works, you can try it.

if (clusterManager.deleteLostServerById(serverId)) {
return Response.success("success");
}
return Response.success("failed");
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit weird. Why not use Response.fail?

Comment on lines 154 to 169
if (router.currentRoute.value.name === 'activeNodeList') {
isShowRemove.value = false
getShuffleActiveNodesPage()
} else if (router.currentRoute.value.name === 'decommissioningNodeList') {
isShowRemove.value = false
getShuffleDecommissioningListPage()
} else if (router.currentRoute.value.name === 'decommissionedNodeList') {
isShowRemove.value = false
getShuffleDecommissionedListPage()
} else if (router.currentRoute.value.name === 'unhealthyNodeList') {
isShowRemove.value = false
getShuffleUnhealthyListPage()
} else if (router.currentRoute.value.name === 'lostNodeList') {
isShowRemove.value = true
getShuffleLostListPage()
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (router.currentRoute.value.name === 'activeNodeList') {
isShowRemove.value = false
getShuffleActiveNodesPage()
} else if (router.currentRoute.value.name === 'decommissioningNodeList') {
isShowRemove.value = false
getShuffleDecommissioningListPage()
} else if (router.currentRoute.value.name === 'decommissionedNodeList') {
isShowRemove.value = false
getShuffleDecommissionedListPage()
} else if (router.currentRoute.value.name === 'unhealthyNodeList') {
isShowRemove.value = false
getShuffleUnhealthyListPage()
} else if (router.currentRoute.value.name === 'lostNodeList') {
isShowRemove.value = true
getShuffleLostListPage()
}
isShowRemove.value = false
if (router.currentRoute.value.name === 'activeNodeList') {
getShuffleActiveNodesPage()
} else if (router.currentRoute.value.name === 'decommissioningNodeList') {
getShuffleDecommissioningListPage()
} else if (router.currentRoute.value.name === 'decommissionedNodeList') {
getShuffleDecommissionedListPage()
} else if (router.currentRoute.value.name === 'unhealthyNodeList') {
getShuffleUnhealthyListPage()
} else if (router.currentRoute.value.name === 'lostNodeList') {
isShowRemove.value = true
getShuffleLostListPage()
}

Comment on lines 56 to 61
if (typeof headers !== 'undefined') {
headers.targetAddress = currentServerStore.currentServer
} else {
headers = {}
headers.targetAddress = currentServerStore.currentServer
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (typeof headers !== 'undefined') {
headers.targetAddress = currentServerStore.currentServer
} else {
headers = {}
headers.targetAddress = currentServerStore.currentServer
}
if (headers) {
headers.targetAddress = currentServerStore.currentServer
} else {
headers = { targetAddress : currentServerStore.currentServer}
}

Maybe this works, I'm not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The points you mentioned have been revised.@xianjingfeng

Copy link
Member

@xianjingfeng xianjingfeng left a comment

Choose a reason for hiding this comment

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

LGTM

@rickyma rickyma changed the title [FEATURE][dashboard] Remove the function of a lost shuffle server. [#1401] feat:(dashboard): Support deleting lost shuffle servers Jul 11, 2024
@rickyma
Copy link
Contributor

rickyma commented Jul 11, 2024

Merged to master. Thanks @yl09099 @xianjingfeng

@rickyma rickyma merged commit 7a28f9f into apache:master Jul 11, 2024
41 of 42 checks passed
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.

[Umbrella] Enhance dashboard capabilities.
4 participants