You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/10/13 17:14:35 UTC

[GitHub] [helix] NealSun96 commented on a change in pull request #1415: Add a system config to disable bucketized feature

NealSun96 commented on a change in pull request #1415:
URL: https://github.com/apache/helix/pull/1415#discussion_r504125298



##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
##########
@@ -143,6 +147,7 @@ public boolean createMaintenance(MaintenanceSignal maintenanceSignal) {
     case EXTERNALVIEW:
       // check if bucketized
       if (value.getBucketSize() > 0) {
+        validateBucketizedEnabled(path, false /*isRead*/);

Review comment:
       I agree with @pkuwm that this may not be scalable and adding it to baseDataAccessor. Future developers might not be aware of this function and nothing enforces them to add it, then there could be unprotected bucketized read/write.

##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
##########
@@ -600,4 +611,13 @@ private int constructOptions(PropertyType type) {
       List<DataUpdater<ZNRecord>> updaters, int options) {
     return _baseDataAccessor.updateChildren(paths, updaters, options);
   }
+
+  private void validateBucketizedEnabled(String path, boolean isRead) {
+    if (!ZNRECORD_BUCKETIZE_ENABLED) {
+      throw new HelixMetaDataAccessException(
+          "Can't " + (isRead ? "read" : "write") + " bucktized ZNode " + path
+              + " because Bucktize feature is not enabled. Please check ZK system property: "

Review comment:
       *Bucketized (2 occasions here) 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org