[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-11-09 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-906:
---

Status: Open  (was: Patch Available)

Cancelling patch, needs test(s).

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-21 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: (was: ZOOKEEPER-906.patch)

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-21 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: ZOOKEEPER-906.patch

Removed mt_adaptor.c changes. Refactored the code based on Jared's review.

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: ZOOKEEPER-906.patch

I have removed last_connect_index = -1 and have it start from valid index 0. 
After that it will only be changed on successful connection.

POLLERR should detect socket errors so we don't sleep on that. This might be 
out of scope of this task so changed back the way it was.

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: (was: ZOOKEEPER-906.patch)

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: ZOOKEEPER-906.patch

called svn diff from trunk

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: (was: ZOOKEEPER-906.patch)

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: ZOOKEEPER-906.patch

+ update last_connect_index when a new successful connection is established.
+ api for configuring max_reconnect_delay (zoo_set_max_reconnect_delay).


> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER-906.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-20 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: (was: ZOOKEEPER.patch)

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-19 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-906:
---

Fix Version/s: 3.4.0

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
>Assignee: Radu Marin
> Fix For: 3.4.0
>
> Attachments: ZOOKEEPER.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-906) Improve C client connection reliability by making it sleep between reconnect attempts as in Java Client

2010-10-19 Thread Radu Marin (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Marin updated ZOOKEEPER-906:
-

Attachment: ZOOKEEPER.patch

Attached a patch to fix this task.
C client will not sleep for a random period (0 - 1000ms) between consecutive 
reconnect attempts.
I will also check all hosts no matter what index has the server is currently 
connected to.
The random delay is independent of session expiration timeout (previously it 
was 1/3) so increasing timeout will give more attempts  to reconnect on 
connection loss before session expires.

> Improve C client connection reliability by making it sleep between reconnect 
> attempts as in Java Client
> ---
>
> Key: ZOOKEEPER-906
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-906
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.3.1
>Reporter: Radu Marin
> Attachments: ZOOKEEPER.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Currently, when a C client get disconnected, it retries a couple of hosts 
> (not all) with no delay between attempts and then if it doesn't succeed it 
> sleeps for 1/3 session expiration timeout period before trying again.
> In the worst case the disconnect event can occur after 2/3 of session 
> expiration timeout has past, and sleeping for even more 1/3 session timeout 
> will cause a session loss in most of the times.
> A better approach is to check all hosts but with random delay between 
> reconnect attempts. Also the delay must be independent of session timeout so 
> if we increase the session timeout we also increase the number of available 
> attempts.
> This improvement covers the case when the C client experiences network 
> problems for a short period of time and is not able to reach any zookeeper 
> hosts.
> Java client already uses this logic and works very good.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.