incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Database size seems off even after compaction runs.
Date Sat, 24 Dec 2011 03:37:22 GMT

On Dec 23, 2011, at 4:09 PM, Mark Hahn wrote:

> 1) How exactly could you make this switch without interrupting service?

Replicate database to new db, then atomically switch your proxy or whatever to the new db
from the old one.
Depending on how long the replication takes, there’s a race condition here where changes
made to the old db during the replication won’t be propagated to the new one; you could
either repeat the process incrementally until this doesn’t happen, or else put the db into
read-only mode while you’re doing the copy.

This might also be helpful: http://tinyurl.com/89lr3fl

> 2) Wouldn't this procedure create the exact same eventual consistency
> problems that deleting documents in a db would?

No; what’s necessary is the revision tree, and the replication will preserve that. You’re
just losing the contents of the deleted revisions that accidentally got left behind because
of the weird way the documents were deleted.

—Jens


Mime
View raw message