narendly commented on a change in pull request #788: Implement request
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r384313276
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java
##########
@@ -87,11 +114,12 @@ public synchronized boolean
deleteMetadataStoreRealm(String realm) {
if (_zkClient.isClosed()) {
throw new IllegalStateException("ZkClient is closed!");
}
- return _zkClient.delete(MetadataStoreRoutingConstants.ROUTING_DATA_PATH
+ "/" + realm);
+ return deleteZkRealm(realm);
}
- // TODO: Forward the request to leader
- return true;
+ String url_suffix = "namespaces/" + _namespace + "/metadata-store-realms/"
+ realm;
+ return forwardRequestToLeader(url_suffix, "delete",
"deleteMetadataStoreRealm",
Review comment:
Use constants. No magic string literals floating around the code.
----------------------------------------------------------------
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]