> On June 1, 2015, 6:01 p.m., Rakesh R wrote:
> > src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java, line 
> > 449
> > <https://reviews.apache.org/r/33713/diff/11/?file=975732#file975732line449>
> >
> >     Any reason to not doing the checks for 
> >     
> >     zks.sessionTracker.checkSession(request.sessionId, request.getOwner()); 
> > during deleteContainer ?
> 
> Jordan Zimmerman wrote:
>     Delete container happens out-of-line by injection from the 
> ContainerManager. The session doesn't matter.

OK. I understand this check is not required for the auto deleting by the 
ContainerManager. But I have one last question, please tell me whether the 
container znode can be deleted through ZooKeeper client. For example,

zk.create("/foo", new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.CONTAINER);
zkc.delete("/foo", -1);

If yes then this client call would need to check the session before performing 
the deleteContainer operation, isn't it ?


> On June 1, 2015, 6:01 p.m., Rakesh R wrote:
> > src/java/test/org/apache/zookeeper/server/CreateContainerTest.java, line 124
> > <https://reviews.apache.org/r/33713/diff/11/?file=975742#file975742line124>
> >
> >     I remember we had a discussion some time back. Now I've got one idea. 
> > Can we think of replacing the Thread.sleep(1000) with some logic like,
> >     
> >     1) Add a NodeDeleted watcher to "/foo" znode
> >     2) Perform deletion of all its children.
> >     3) Wait to see the NodeDeleted event. Probably we can have a timeout 
> > wait of 10 seconds max here.
> >     
> >     wats your opinion?
> >     
> >     If this works, please modify all the similar sleep occurances.
> 
> Jordan Zimmerman wrote:
>     My feeling is that this is all over Zookeeper source. It should be 
> handled separately. There are lots of other tests that have sleeps.
> 
> Rakesh R wrote:
>     Since this is completely new unit test, IMHO we could think of avoiding 
> this kinda sleeps (if possible). If my idea didnt work out, probably will 
> take opinion from others. If you find any flaky sleeps in the existing unit 
> test code, could you please start discuss in separate jira ticket to refine 
> the same. Does this makes sense to you?
> 
> Jordan Zimmerman wrote:
>     Yeah - I can open another ticket. Ideally, I'd like to put testing hooks 
> into ZooKeeper. When writing Curator it was a bear to test against the 
> server. Curator's tests are littered with Timers. I'd love to get rid of 
> those.

Since the current patch is too big, I agree to do the initial checkins and then 
immedaitely we could start another jira task for improving the Container test 
case to refactor Thread.sleeps(1000); and Thread.sleep(500) part. It would be 
really great if we could get this out:-)


- Rakesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33713/#review86010
-----------------------------------------------------------


On June 1, 2015, 6:17 p.m., Jordan Zimmerman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33713/
> -----------------------------------------------------------
> 
> (Updated June 1, 2015, 6:17 p.m.)
> 
> 
> Review request for zookeeper, michim, Rakesh R, and Raul Gutierrez Segales.
> 
> 
> Bugs: ZOOKEEPER-2163
>     https://issues.apache.org/jira/browse/ZOOKEEPER-2163
> 
> 
> Repository: zookeeper-git
> 
> 
> Description
> -------
> 
> Introduce new ZNode type: container
> 
> 
> Diffs
> -----
> 
>   src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml 5401157 
>   src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml 218baf3 
>   src/java/main/org/apache/zookeeper/CreateMode.java d87f410 
>   src/java/main/org/apache/zookeeper/MultiTransactionRecord.java ca7dd98 
>   src/java/main/org/apache/zookeeper/Op.java 97d3d7b 
>   src/java/main/org/apache/zookeeper/ZooDefs.java a4fc331 
>   src/java/main/org/apache/zookeeper/ZooKeeper.java fdee4e6 
>   src/java/main/org/apache/zookeeper/cli/CreateCommand.java c6de7c6 
>   src/java/main/org/apache/zookeeper/server/ContainerManager.java 
> PRE-CREATION 
>   src/java/main/org/apache/zookeeper/server/DataNode.java b341a69 
>   src/java/main/org/apache/zookeeper/server/DataTree.java 78cddb1 
>   src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 
> 7e3c29f 
>   src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 0e8133e 
>   src/java/main/org/apache/zookeeper/server/Request.java bed9b13 
>   src/java/main/org/apache/zookeeper/server/TraceFormatter.java 582383d 
>   src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java 63daea0 
>   src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java 
> cf0900b 
>   
> src/java/main/org/apache/zookeeper/server/quorum/FollowerRequestProcessor.java
>  4d061f4 
>   src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java 
> 6434d02 
>   
> src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java
>  36a23ee 
>   
> src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyRequestProcessor.java
>  a49319c 
>   src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java 1a45c5e 
>   src/java/test/org/apache/zookeeper/server/CreateContainerTest.java 
> PRE-CREATION 
>   src/java/test/org/apache/zookeeper/test/CreateModeTest.java 9db01bb 
>   src/zookeeper.jute 921f658 
> 
> Diff: https://reviews.apache.org/r/33713/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jordan Zimmerman
> 
>

Reply via email to