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

ASF GitHub Bot commented on STORM-330:
--------------------------------------

GitHub user kishorvpatil opened a pull request:

    https://github.com/apache/incubator-storm/pull/220

    [STORM-330] Implement storm exponential backoff stategy for netty client 
and curator

    Fix  [netty 
Client.java](storm-core/src/jvm/backtype/storm/messaging/netty/Client.java) 
retry logic and [Utils.java](storm-core/src/jvm/backtype/storm/utils/Utils.java
    ) Curator Framework. 
    The `StormBoundedExponentialBackoffRetry` provides generic 
exponential-linear backoff retry policy for STORM. It overcomes the following 
shortcomings in curator frameworks implementation of 
`BoundedExponentialBackOffRetry`:
      - Limitation maxRetries to 29.
      - `getSleepTimeMs` fails with IllegalArgumentException by passing -ve 
argument to random.nextInt if retryCount > 29.
      - Also, exponential calculation in quickly catches up to `maxSleepTimeMs` 
- eventually adding more delay and increasing collision possibility.
    This class calculates `threshold` for exponentially increasing `sleeptime` 
for retries. Beyond threshold, the sleep time increase is linear. 
    It adds jitter for exponential/linear retry.
    It guarantees `currSleepTimeMs >= prevSleepTimeMs` and `baseSleepTimeMs <= 
currSleepTimeMs <= maxSleepTimeMs`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kishorvpatil/incubator-storm 
storm-backoff-retry-strategy

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-storm/pull/220.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #220
    
----
commit 7d21ffe9f9f61c9e3115add26a250b95084b131d
Author: Kishor Patil <[email protected]>
Date:   2014-08-08T20:32:20Z

    Implement storm exponential backoff stategy to use for netty client and 
curator.

----


> storm.messaging.netty.max_retries option in config file not being used if > 30
> ------------------------------------------------------------------------------
>
>                 Key: STORM-330
>                 URL: https://issues.apache.org/jira/browse/STORM-330
>             Project: Apache Storm (Incubating)
>          Issue Type: Bug
>    Affects Versions: 0.9.1-incubating
>            Reporter: Roland Jungnickel
>            Priority: Minor
>
> I have been trying to set the storm.messaging.netty.max_retries to 240 
> because of connection issues when one worker takes a longer time to start its 
> processes. But due to this line 
> https://github.com/apache/incubator-storm/blob/1a0b46e95ab4ac467525314a75819a75dec92c40/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java#L73
>  the max_retries is capped at 30. I am guessing this is a bug or at least 
> should be noted somewhere in the documentation?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to