Sequential node creation does not use always use digits in node name given 
certain Locales.Sequential node creation does not use always use digits in node 
name given certain Locales.  
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-1206
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1206
             Project: ZooKeeper
          Issue Type: Bug
          Components: server
    Affects Versions: 3.3.3
            Reporter: Mark Miller
            Priority: Minor
             Fix For: 3.3.4


While I always expect to be able to parse a sequential node by looking for 
digits, under some locals you end up with non digits - for example: n_००००००००००

It looks like the problem is around line 236 in PrepRequestProcessor:

{code}
                if (createMode.isSequential()) {
                    path = path + String.format("%010d", parentCVersion);
                }
{code}

Instead we should pass Locale.ENGLISH to the format call.

{code}
                if (createMode.isSequential()) {
                    path = path + String.format(Locale.ENGLISH, "%010d", 
parentCVersion);
                }
{code}

Lucene/Solr tests with random Locales, and some of my tests that try and 
inspect the node name and order things expect to find digits - currently my 
leader election recipe randomly fails when the wrong locale pops up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to