NealSun96 commented on a change in pull request #829: Fix bugs in
ZkRoutingDataReader and ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/829#discussion_r385405130
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataReader.java
##########
@@ -134,6 +147,7 @@ public synchronized void handleChildChange(String s,
List<String> list) {
// Subscribe data changes again because some children might have been
deleted or added
_zkClient.unsubscribeAll();
+
_zkClient.subscribeChildChanges(MetadataStoreRoutingConstants.ROUTING_DATA_PATH,
this);
Review comment:
After making the fix, `handleChildChange` and `handleDataDeleted` are
completely equal now. I added a comment on line 127 based on what you told me
to justify the duplication - sometimes the callbacks may go missing. Should we
consider calling `handleDataDeleted` from `handleChildChange`, for example, to
reduce duplication? @narendly
----------------------------------------------------------------
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]