NealSun96 commented on a change in pull request #788: WIP: Implement request
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r382332324
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/metadatastore/MetadataStoreDirectoryAccessor.java
##########
@@ -90,9 +90,13 @@ public Response getAllMetadataStoreRealms() {
@Path("/metadata-store-realms/{realm}")
public Response addMetadataStoreRealm(@PathParam("realm") String realm) {
try {
- _metadataStoreDirectory.addMetadataStoreRealm(_namespace, realm);
+ if (!_metadataStoreDirectory.addMetadataStoreRealm(_namespace, realm)) {
+ return serverError();
+ }
} catch (IllegalArgumentException ex) {
return notFound(ex.getMessage());
+ } catch (IllegalStateException ex) {
+ return serverError();
Review comment:
If it's not handled, the exception will cause a server error anyways. Are
you suggesting to handle it and not raise server error? IMO zkClient being
closed is definitely a server error.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]