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

Sergey Shelukhin commented on ZOOKEEPER-2469:
---------------------------------------------

hasSufficient... also updates the latest time, so it still  needs to be called.
I am not really familiar with the code enough to refactor, just trying to fix 
the immediate issue that we see where error is swallowed and the retry is 
broken, so it's impossible to debug. Perhaps it can be done in a followup, but 
it doesn't look like this class has any test coverage and the method is quite a 
tangle. 
I can make the rest of the changes. Does ZK officially not support Java 6?

> infinite loop in ZK re-login
> ----------------------------
>
>                 Key: ZOOKEEPER-2469
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2469
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Sergey Shelukhin
>            Assignee: Sergey Shelukhin
>         Attachments: ZOOKEEPER-2469.patch
>
>
> {noformat}
>                         int retry = 1;
>                         while (retry >= 0) {
>                             try {
>                                 reLogin();
>                                 break;
>                             } catch (LoginException le) {
>                                 if (retry > 0) {
>                                     --retry;
>                                     // sleep for 10 seconds.
>                                     try {
>                                         Thread.sleep(10 * 1000);
>                                     } catch (InterruptedException e) {
>                                         LOG.error("Interrupted during login 
> retry after LoginException:", le);
>                                         throw le;
>                                     }
>                                 } else {
>                                     LOG.error("Could not refresh TGT for 
> principal: " + principal + ".", le);
>                                 }
>                             }
>                         }
> {noformat}
> will retry forever. Should return like the one above



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to