-
Notifications
You must be signed in to change notification settings - Fork 141
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
Conversation
95953b9
to
7283732
Compare
Codecov ReportAttention: Patch coverage is
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. |
c481092
to
322e9eb
Compare
ping @xianjingfeng ~ |
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; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"); |
There was a problem hiding this comment.
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
?
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() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() | |
} |
if (typeof headers !== 'undefined') { | ||
headers.targetAddress = currentServerStore.currentServer | ||
} else { | ||
headers = {} | ||
headers.targetAddress = currentServerStore.currentServer | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged to master. Thanks @yl09099 @xianjingfeng |
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.
Why are the changes needed?
Fix: #1401
Does this PR introduce any user-facing change?
Yes.
How was this patch tested?
Add UT.