Comment 2 for bug 707321

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Chad, I can't really see what's going on here, if you can guide me, I'd be happy to work on this, but I don't know where to start.

It seems that we (potentially) create a database after reconnecting. This seems very wrong to me. (reconnection should not ever have such side effects I think.) The obvious kludge fix of silently trapping the PreconditionFailed exception (on the assumption that the db must already be there then) seems like it wouldn't work, since the code does check for the presence of the db first. It looks like there's a mismatch between what python-couchdb knows, and what the actual state of the couchdb is.

Also I don't understand why the __init__ of Database calls _reconnect, before we have even detected that there is any problem.

I've not been able to reproduce this locally, but as you can see from the number of duplicates, it's hardly a rare problem.