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_r404951028
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/ZkMetadataStoreDirectory.java
##########
@@ -322,14 +322,19 @@ public void refreshRoutingData(String namespace) {
}
Map<String, List<String>> rawRoutingData;
+ // Remove the raw data first in case of failure on creation
+ _realmToShardingKeysMap.remove(namespace);
Review comment:
**NOTE**: This check is added for the case when
"METADATA_STORE_ROUTING_DATA" is deleted.
There is one edge case that's *not* handled: when
"METADATA_STORE_ROUTING_DATA" contains no node, and then
"METADATA_STORE_ROUTING_DATA" gets deleted. In that case, before deletion, the
routing data should be empty; after deletion, the routing data should return
404 due to missing namespace. However, since there is no listener on
"METADATA_STORE_ROUTING_DATA" itself, its deletion event cannot be handled.
Please share you thoughts on whether this edge case should be handled, or if
you think this falls into misuse.
----------------------------------------------------------------
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]