Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1786

ZooKeeper data model documentation is incorrect

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.6
    • 3.4.6, 3.5.0
    • documentation
    • None

    Description

      When I look at https://zookeeper.apache.org/doc/trunk/zookeeperProgrammers.html#ch_zkDataModel, I see two things that seem wrong in terms of restricted characters:

      • \uXFFFE - \uXFFFF (where X is a digit 1 - E)
      • \uF0000 - \uFFFFF

      These definitions are invalid characters in Java and aren't reflected in PathUtils either (or PathUtilsTest). In fact the code in PathUtils states:

                  } else if (c > '\u0000' && c <= '\u001f'
                          || c >= '\u007f' && c <= '\u009F'
                          || c >= '\ud800' && c <= '\uf8ff'
                          || c >= '\ufff0' && c <= '\uffff') {
                      reason = "invalid charater @" + i;
                      break;
                  }
      

      Unless I am missing something, this simple patch should fix the documentation problem:

      Index: src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml
      ===================================================================
      --- src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml	(revision 1530514)
      +++ src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml	(working copy)
      @@ -139,8 +139,7 @@
      
             <listitem>
               <para>The following characters are not allowed: \ud800 - uF8FF,
      -        \uFFF0 - uFFFF, \uXFFFE - \uXFFFF (where X is a digit 1 - E), \uF0000 -
      -        \uFFFFF.</para>
      +        \uFFF0 - uFFFF.</para>
             </listitem>
      
             <listitem>
      

      Attachments

        1. ZOOKEEPER-1786.patch
          0.6 kB
          Niraj Tolia

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ntolia Niraj Tolia
            ntolia Niraj Tolia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment