curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-228) A serious death cycle error(一个严重的死循环错误)
Date Wed, 29 Jul 2015 00:21:04 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645263#comment-14645263
] 

ASF GitHub Bot commented on CURATOR-228:
----------------------------------------

Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/93#issuecomment-125788009
  
    I had a look into implementing a Watch in the case where we get a NOAUTH error when trying
to create the ephemeral node. The plan was that when the parent node ACL was modified that
the watch would fire and we would retry. Unfortunately it seems that ACL changes in ZK don't
fire Watches (I wasn't aware of this), so there doesn't seem to be a way to reliably know
when the ACL changes without doing some sort of polling which is pretty ugly.


> A serious death cycle error(一个严重的死循环错误)
> ---------------------------------------
>
>                 Key: CURATOR-228
>                 URL: https://issues.apache.org/jira/browse/CURATOR-228
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.7.0, 2.7.1, 2.8.0
>         Environment: windows linux mac ....
>            Reporter: coder_czp
>            Assignee: Cameron McKenzie
>
> 当用异步的方式创建带有多层目录的临时节点时,如果客户端没有zookeeper的写入权限,curator
就会陷入死循环,客户端会一直向服务器提交写入报文,但是永远不会成功。出错的代码逻辑如下:
> When used asynchronous way to create a temporary node multi directory, if the client
does not have the zookeeper write permissions, the curator will get into a cycle of death,
the client will has been submitted to the server write message, but never succeed. Error code
logic is as follows:
> 1  PersistentEphemeralNode sessionNode = new PersistentEphemeralNode(curatorClient, Mode.EPHEMERAL,"/a/b/c",
"test");
>    sessionNode.start();
>      CreateBuilderImpl:
>        forPath(xx)-->pathInBackground(xx)-->
> 		    CuratorFrameworkImpl:processBackgroundOperation(operationAndData, null);
> 				                    --->performBackgroundOperation(xx)
> 				OperationAndData:callPerformBackgroundOperation(xx)-->
>                          CreateBuilderImpl:performBackgroundOperation(xx)->backgroundCreateParentsThenNode(xx)
>                                              -->queueOperation(xx){backgroundOperations.offer(operationAndData);}

>                                
>   //这个循环会触发1,导致循环无法退出
>   //This cycle will trigger 1, causing the loop to exit.  
>   //CuratorFrameworkImpl
>  2 private void backgroundOperationsLoop()
>     {
>         while ( !Thread.currentThread().isInterrupted() )
>         {
>             OperationAndData<?> operationAndData;
>             try
>             {
>                 operationAndData = backgroundOperations.take();
>                 if ( debugListener != null )
>                 {
>                     debugListener.listen(operationAndData);
>                 }
>             }
>             catch ( InterruptedException e )
>             {
>                 Thread.currentThread().interrupt();
>                 break;
>             }
>             performBackgroundOperation(operationAndData);
>         }
>     }	
>  如果需要更多细节,请给我发邮件: coder_czp@126.com	
>  If you need more details, please email me:coder_czp@126.com



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message