Skip to content

Commit bedc962

Browse files
committed
grpc-js-xds: Validate continuity of priorities in EDS updates
1 parent 8832fc2 commit bedc962

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/grpc-js-xds/src/xds-stream-state/eds-state.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export class EdsState extends BaseXdsStreamState<ClusterLoadAssignment__Output>
9292
return false;
9393
}
9494
}
95+
for (const priority of priorityTotalWeights.keys()) {
96+
if (priority > 0 && !priorityTotalWeights.has(priority - 1)) {
97+
return false;
98+
}
99+
}
95100
return true;
96101
}
97102
}

0 commit comments

Comments
 (0)