You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/14 14:01:41 UTC

[GitHub] [shardingsphere] terrymanu commented on pull request #8587: Add ShardingAlgorithmType enum to replace the sharing algorithm type with magic string.

terrymanu commented on pull request #8587:
URL: https://github.com/apache/shardingsphere/pull/8587#issuecomment-744459697


   > > Sharding algorithms are dynamic and loaded via SPI.
   > > The enum is static config and broken OCP.
   > > So it is better to do not use enum to define sharding algorithm types.
   > 
   > This Enum only used for build-in sharding algorithms to manage the SPI types easily.
   > And this enum is not broken OCP, Sharding algorithms still are dynamic and loaded via SPI.
   
   If user custom a new sharding algorithm, do they need to update the enum? 
   If yes, OCP is broken; 
   If not the custom sharding algorithm is different with built-in one, we'd like keep the customization sharding algorithm consist with built-in one.


----------------------------------------------------------------
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:
users@infra.apache.org