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_r405023861
##########
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);
try {
rawRoutingData = _routingDataReaderMap.get(namespace).getRoutingData();
_realmToShardingKeysMap.put(namespace, rawRoutingData);
} catch (InvalidRoutingDataException e) {
+ _routingDataMap.remove(namespace);
LOG.error("Failed to refresh cached routing data for namespace {}",
namespace, e);
return;
}
+ // Remove routing data first in case of failure on creation
+ _routingDataMap.remove(namespace);
Review comment:
Makes sense, let me change that.
----------------------------------------------------------------
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]