pkuwm commented on a change in pull request #955: Fix MSD routing data
refreshing for update methods
URL: https://github.com/apache/helix/pull/955#discussion_r410078265
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/ZkMetadataStoreDirectory.java
##########
@@ -304,42 +314,35 @@ public boolean deleteShardingKey(String namespace,
String realm, String sharding
*/
@Override
public void refreshRoutingData(String namespace) {
- // Safe to ignore the callback if any of the maps are null.
- // If routingDataMap is null, then it will be populated by the constructor
anyway
- // If routingDataMap is not null, then it's safe for the callback function
to update it
- if (_routingZkAddressMap == null || _realmToShardingKeysMap == null
- || _routingDataReaderMap == null || _routingDataWriterMap == null) {
- LOG.warn(
- "refreshRoutingData callback called before ZKMetadataStoreDirectory
was fully initialized. Skipping refresh!");
Review comment:
@NealSun96 Thanks for the explanation.
After I check the code carefully, I don't see what you said is the case.
`ZkRoutingDataReader` is initialized after the maps are created. So I think
this check is safe to remove.
----------------------------------------------------------------
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]