NealSun96 opened a new issue #794: Incorrect behavior in 
ZkRoutingDataWriter.addShardingKey
URL: https://github.com/apache/helix/issues/794
 
 
   In the current version of `ZkRoutingDataWriter`, its `addShardingKey` 
function has the following line:
   ```
   znRecord.setListField(MetadataStoreRoutingConstants.ZNRECORD_LIST_FIELD_KEY, 
Collections.singletonList(shardingKey));
   ```
   This is an incorrect behavior because it replaces the existing sharding keys 
within this `znRecord` with a list of one element - the resulting behavior is 
that all existing sharding keys will be replaced by the new sharding key 
getting added. The fix is to get the current list and append the new sharding 
key instead of replacing the current list. 

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