NealSun96 commented on a change in pull request #933: Fix 
MetadataStoreDirectory routing data cache refresh bug
URL: https://github.com/apache/helix/pull/933#discussion_r405098757
 
 

 ##########
 File path: 
metadata-store-directory-common/src/main/java/org/apache/helix/msdcommon/datamodel/TrieRoutingData.java
 ##########
 @@ -48,6 +48,10 @@ public TrieRoutingData(Map<String, List<String>> 
routingData)
       throw new InvalidRoutingDataException("routingData cannot be null or 
empty");
     }
 
+    if (!containsShardingKey(routingData)) {
+      throw new InvalidRoutingDataException("routingData needs at least 1 
sharding key");
+    }
 
 Review comment:
   In my user manual I have briefly talked about invalid routing data. I will 
expand some sections for that. 
   In terms of your second question, the refresh logic will trigger and 
`TrieRoutingData` will be removed from MSD when the last key is deleted, 
similar to how when the user deletes all routing data, `TrieRoutingData` is 
removed. Note that the raw routing data is not removed because the realms are 
still there. Also a reminder, when we don't have `TrieRoutingData`, the 
accessor behaves correctly. 

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