You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ma...@apache.org on 2021/10/31 06:07:32 UTC

[zookeeper] branch master updated: ZOOKEEPER-4406: fix the znode type for Barrier implementation in the zookeeperTutorial.md

This is an automated email from the ASF dual-hosted git repository.

maoling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new e5dd8a5  ZOOKEEPER-4406: fix the znode type for Barrier implementation in the zookeeperTutorial.md
e5dd8a5 is described below

commit e5dd8a57cddb6e3958a53b8228f94b74da7ca7ce
Author: yuMoyu <23...@qq.com>
AuthorDate: Sun Oct 31 14:07:10 2021 +0800

    ZOOKEEPER-4406: fix the znode type for Barrier implementation in the zookeeperTutorial.md
    
    With EPHEMERAL_SEQUENTIAL,the generated node name will be added with the sequence number, and the delete() will report error that it cannot be found
    EPHEMERAL_SEQUENTIAL产生的节点名会加上顺序编号,删除会报找不到
    
    Author: yuMoyu <23...@qq.com>
    
    Reviewers: maoling <ma...@apache.org>
    
    Closes #1738 from yuMoyu/patch-1
---
 zookeeper-docs/src/main/resources/markdown/zookeeperTutorial.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zookeeper-docs/src/main/resources/markdown/zookeeperTutorial.md b/zookeeper-docs/src/main/resources/markdown/zookeeperTutorial.md
index 4057a38..366c0a9 100644
--- a/zookeeper-docs/src/main/resources/markdown/zookeeperTutorial.md
+++ b/zookeeper-docs/src/main/resources/markdown/zookeeperTutorial.md
@@ -156,7 +156,7 @@ a boolean flag that enables the process to set a watch. In the code the flag is
 
     boolean enter() throws KeeperException, InterruptedException{
         zk.create(root + "/" + name, new byte[0], Ids.OPEN_ACL_UNSAFE,
-                CreateMode.EPHEMERAL_SEQUENTIAL);
+                CreateMode.EPHEMERAL);
         while (true) {
             synchronized (mutex) {
                 List<String> list = zk.getChildren(root, true);
@@ -463,7 +463,7 @@ Start a barrier with 2 participants (start as many times as many participants yo
 
             boolean enter() throws KeeperException, InterruptedException{
                 zk.create(root + "/" + name, new byte[0], Ids.OPEN_ACL_UNSAFE,
-                        CreateMode.EPHEMERAL_SEQUENTIAL);
+                        CreateMode.EPHEMERAL);
                 while (true) {
                     synchronized (mutex) {
                         List<String> list = zk.getChildren(root, true);