NealSun96 commented on a change in pull request #788: WIP: Implement request 
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r382333153
 
 

 ##########
 File path: 
helix-rest/src/main/java/org/apache/helix/rest/server/resources/metadatastore/MetadataStoreDirectoryAccessor.java
 ##########
 @@ -153,9 +161,13 @@ public Response getShardingKeys(@QueryParam("realm") 
String realm) {
   public Response addShardingKey(@PathParam("realm") String realm,
       @PathParam("sharding-key") String shardingKey) {
     try {
-      _metadataStoreDirectory.addShardingKey(_namespace, realm, shardingKey);
+      if (!_metadataStoreDirectory.addShardingKey(_namespace, realm, 
shardingKey)) {
+        return serverError();
 
 Review comment:
   There are numerous different reasons why this could happen, and one single 
returned message is not going to cover all cases; saying it's a server error is 
sufficient to express that it's a server side situation. 
   On the other hand, whenever `false` is returned here, there are server logs 
that can help us identify the cause. 

----------------------------------------------------------------
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]

Reply via email to