mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Dashboard][Bugfix] Filter dead nodes from Machine View (fixes duplicate node issue) (#12579)
This commit is contained in:
parent
2ec7b7367e
commit
a5c846c83b
2 changed files with 8 additions and 3 deletions
|
@ -112,7 +112,7 @@ export type NodeDetails = {
|
|||
} & BaseNodeInfo;
|
||||
|
||||
export type RayletData = {
|
||||
// Merger of GCSNodeStats and GetNodeStatsReply
|
||||
// Merger of GCSNodeInfo and GetNodeStatsReply
|
||||
// GetNodeStatsReply fields.
|
||||
// Note workers are in an array in NodeDetails
|
||||
objectStoreUsedMemory: number;
|
||||
|
|
|
@ -139,7 +139,12 @@ const useNodeInfoStyles = makeStyles((theme: Theme) =>
|
|||
}),
|
||||
);
|
||||
|
||||
const nodesSelector = (state: StoreState) => state.dashboard?.nodeInfo?.clients;
|
||||
// Dead node payloads don't contain the full information needed to render
|
||||
// so we filter them out here.
|
||||
const liveNodesSelector = (state: StoreState) =>
|
||||
state.dashboard?.nodeInfo?.clients.filter(
|
||||
(node) => node.raylet.state === "ALIVE",
|
||||
);
|
||||
|
||||
type DialogState = {
|
||||
nodeIp: string;
|
||||
|
@ -170,7 +175,7 @@ const NodeInfo: React.FC<{}> = () => {
|
|||
const toggleOrder = () => setOrder(order === "asc" ? "desc" : "asc");
|
||||
const [orderBy, setOrderBy] = React.useState<nodeInfoColumnId | null>(null);
|
||||
const classes = useNodeInfoStyles();
|
||||
const nodes = useSelector(nodesSelector);
|
||||
const nodes = useSelector(liveNodesSelector);
|
||||
if (!nodes) {
|
||||
return <Typography color="textSecondary">Loading...</Typography>;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue