desaikomal commented on code in PR #2653:
URL: https://github.com/apache/helix/pull/2653#discussion_r1355480088
##########
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/ResourceAssignmentOptimizerAccessor.java:
##########
@@ -359,8 +359,10 @@ private void computeWagedAssignmentResult(List<IdealState>
wagedResourceIdealSta
ConfigAccessor cfgAccessor = getConfigAccessor();
List<ResourceConfig> wagedResourceConfigs = new ArrayList<>();
for (IdealState idealState : wagedResourceIdealState) {
- wagedResourceConfigs
- .add(cfgAccessor.getResourceConfig(clusterId,
idealState.getResourceName()));
+ ResourceConfig resourceConfig = cfgAccessor.getResourceConfig(clusterId,
idealState.getResourceName());
Review Comment:
aha, so in some way, user has configured resource as WAGED but hasn't
provided WAGED resource config? isn't this user error? we can prevent null
pointer exception but shouldn't user know that the config is wrong too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]