zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raul Gutierrez Segales (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2137) Make testPortChange() less flaky
Date Wed, 08 Jun 2016 15:28:21 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320742#comment-15320742

Raul Gutierrez Segales commented on ZOOKEEPER-2137:


public static void testNormalOperation(ZooKeeper writer, ZooKeeper reader)
                        writer.create("/test", "test".getBytes(),
                            ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+                       reader.create("/dummy", "dummy".getBytes(),
+                               ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
                    } catch (KeeperException.NodeExistsException e) {                    

don't you want *each* create() call to be independently wrapped within a try/catch NodeExistsException
to ensure both writer and reader have an updated view of the world?

> Make testPortChange() less flaky
> --------------------------------
>                 Key: ZOOKEEPER-2137
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2137
>             Project: ZooKeeper
>          Issue Type: Sub-task
>            Reporter: Hongchao Deng
>            Assignee: Michael Han
>             Fix For: 3.5.2, 3.6.0
>         Attachments: ZOOKEEPER-2137-cb.patch, ZOOKEEPER-2137.patch, ZOOKEEPER-2137.patch,
> The cause of flaky failure of testPortChange() is a race in sync().
> I figured out it could take some time to fix sync(). Meanwhile, we can make testPortChange()
less flaky by doing reconfig on the leader. We can change this back in the fix of ZOOKEEPER-2136.

This message was sent by Atlassian JIRA

View raw message