helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kishore gopalakrishna (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HELIX-572) External view is recreated every time for bucketized resource
Date Sun, 08 Mar 2015 07:41:38 GMT
kishore gopalakrishna created HELIX-572:

             Summary: External view is recreated every time for bucketized resource
                 Key: HELIX-572
                 URL: https://issues.apache.org/jira/browse/HELIX-572
             Project: Apache Helix
          Issue Type: Bug
          Components: helix-core
    Affects Versions: 0.6.4, 0.7.1
            Reporter: kishore gopalakrishna
            Assignee: kishore gopalakrishna
            Priority: Critical
             Fix For: 0.6.5, 0.7.2

If the resource is bucketized, controller first deletes the existing external view and then
recreates it. First of all this is inefficient and triggers a lot of unwanted changes.

The code is i here ZKHelixDataAccessor
        if (value.getBucketSize() == 0) {
        } else {
          _baseDataAccessor.remove(path, options);

Second, the external view change listeners stops listening to further changes.  This may or
may not happen all the time, but the probability of occurrence is pretty high.

After EV is deleted, the listener gets a callback. The callback is handled by zkcallbackhandler.
When it gets a callback, it tries to set the watch again but the path may or may not exist
(depending on how fast the controller recreated the external view). If the path exists there
is not problem, but if it does not, we assume that the parent node is deleted and remove the
listener and invoke FINALIZE. Again this would not have happened if the resource was not bucketized.

  public void handleChildChange(String parentPath, List<String> currentChilds) {
    try {
      if (parentPath != null && parentPath.startsWith(_path)) {
        NotificationContext changeContext = new NotificationContext(_manager);

        if (currentChilds == null) {
          // parentPath has been removed
          if (parentPath.equals(_path)) {
            // _path has been removed, remove this listener
            _manager.removeListener(_propertyKey, _listener);
        } else {
    } catch (Exception e) {
      String msg =
          "exception in handling child-change. instance: " + _instanceName + ", parentPath:
              + parentPath + ", listener: " + _listener;
      ZKExceptionHandler.getInstance().handle(msg, e);


This message was sent by Atlassian JIRA

View raw message