NealSun96 commented on a change in pull request #731: Add TrieRoutingData 
constructor
URL: https://github.com/apache/helix/pull/731#discussion_r377233092
 
 

 ##########
 File path: 
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/ZkMetadataStoreDirectory.java
 ##########
 @@ -170,20 +170,21 @@ public void refreshRoutingData(String namespace) {
     // Check if namespace exists; otherwise, return as a NOP and log it
     if (!_routingZkAddressMap.containsKey(namespace)) {
       LOG.error("Failed to refresh internally-cached routing data! Namespace 
not found: " + namespace);
+      return;
     }
 
     try {
-      _realmToShardingKeysMap.put(namespace, 
_routingDataReaderMap.get(namespace).getRoutingData());
+      Map<String, List<String>> routingData = 
_routingDataReaderMap.get(namespace).getRoutingData();
+      _realmToShardingKeysMap.put(namespace, routingData);
+
+      if (_routingDataMap != null) {
+        MetadataStoreRoutingData newRoutingData = new 
TrieRoutingData(routingData);
+        _routingDataMap.put(namespace, newRoutingData);
+      }
     } catch (InvalidRoutingDataException e) {
-      LOG.error("Failed to get routing data for namespace: " + namespace + 
"!");
+      LOG.error("Routing data construction has failed for namespace: " + 
namespace + "!");
 
 Review comment:
   Good point. I wasn't sure how to phrase this message because there are 
multiple reasons. I'll use your advised one. 

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