Affects Version/s: 0.9
Fix Version/s: None
couchdb 0.9.0.r766883 CentOS x86_64
Skill Level:Regular Contributors Level (Easy to Medium)
We had a large doc, with 100000s of revisions which was having trouble replicating. (Let's ignore the why which is probably down to our networking). We use pull replication on this 0.9 installation.
We wanted to remove that particular doc (as we could do) from teh databases so that the replicater would not have to keep trying to replicate it.
First we deleted it. Of course this meant that the replication record for the doc had yet another entry for it.
We then compacted the database - hoping to reduce the number of revisions - but of course this wouldn't work either.
We then purged all open revisions of the doc from the source database, but the target still tried to replicate this doc. And tried. And tried, eventually causing the server to crash.
In the above there were 900+ open revisions.
The question is this: should the replicater still try to replicate docs which have been purged from the source?
- It is possible that this bug is invalid on 0.9+/0.10.x/0.11 - we haven't the ability to re-create the scenario.
- It is also possible that the
COUCHDB-416fix has also fixed this - we haven't upgraded enough environments yet to verify, even if we could re-create the scenario
- It's OK that the replicater had tried to replicate all those revs as they did indeed once exist - it's only whether it should recognise that it cannot access them any longer and therefore stop requesting it.
Our work around was to delete the target database entirely, restart the CouchDB instance, re-create a new database of the same name and re-replicate. Such a process is not always going to be available as an option on live production environments.