lei-xia commented on a change in pull request #1129:
URL: https://github.com/apache/helix/pull/1129#discussion_r455896775
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/PerInstanceAccessor.java
##########
@@ -308,19 +310,33 @@ public Response
updateInstanceConfig(@PathParam("clusterId") String clusterId,
}
InstanceConfig instanceConfig = new InstanceConfig(record);
ConfigAccessor configAccessor = getConfigAccessor();
+
+ if (doSanityCheck && (command == Command.delete || command ==
Command.update)) {
+ try {
+ validateDeltaInstanceConfigForUpdate(clusterId, instanceName,
configAccessor,
+ instanceConfig, command == Command.delete);
+ } catch (IllegalArgumentException ex) {
+ LOG.error(
+ String.format("Error in update instance config for instance: %s",
instanceName),
+ ex);
+ return serverError(ex);
Review comment:
If possible, let us return some useful error information to the caller,
for example, where is the format error, such as "Invalid topology setting", etc.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]