Merge lp://qastaging/~cmiller/desktopcouch/sleep-and-retry-on-socket-error into lp://qastaging/desktopcouch

Proposed by Chad Miller
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 155
Merged at revision: 158
Proposed branch: lp://qastaging/~cmiller/desktopcouch/sleep-and-retry-on-socket-error
Merge into: lp://qastaging/desktopcouch
Diff against target: 28 lines (+7/-0)
1 file modified
desktopcouch/records/server_base.py (+7/-0)
To merge this branch: bzr merge lp://qastaging/~cmiller/desktopcouch/sleep-and-retry-on-socket-error
Reviewer Review Type Date Requested Status
Rodrigo Moya (community) Approve
Guillermo Gonzalez Needs Information
Tim Cole (community) Approve
Review via email: mp+24245@code.qastaging.launchpad.net

Commit message

Try to avoid a bug I can not reproduce, which may be related to suspend in some way. On a socket error when trying to talk to couchdb, reconnect, which may spawn a new couchdb if one is not running (for reasons that are unknown to Chad). (LP: #522538)

To post a comment you must log in.
Revision history for this message
Tim Cole (tcole) wrote :

Some sort of backoff on retry would be good, particularly if we're not only connecting to localhost with this code (in which case e.g. there may be actual network issues).

review: Approve
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

+1 on Tim's idea about a backoff

review: Approve
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

btw, could you add some test for this case?
As I don't know much about desktopcouch code, I don't know if it's even possible...but I think it would be good to have a test for this.

review: Needs Information
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Yeah, it should have some kind of max number of reconnect attempts

review: Needs Fixing
Revision history for this message
Chad Miller (cmiller) wrote :

Rodrigo, it does have a maximum. This is the error condition in the body of a 'for' loop.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

> Rodrigo, it does have a maximum. This is the error condition in the body of a
> 'for' loop.

ah, sorry, missed that, so approving

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches