couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <>
Subject Re: Replication vs. Compaction
Date Fri, 31 Jan 2014 17:59:29 GMT

On Jan 31, 2014, at 9:46 AM, Mark Hahn <> wrote:

> It wouldn't matter if it did.  Within the same server linux short-circuits
> http to make it the same as unix sockets, i.e. very little overhead.

I think you mean it short-circuits TCP :)
There's extra work involved in HTTP generation & parsing no matter what transport you're
sending it over. And then the replicator is doing a bunch of JSON and multipart generation/parsing.
Whereas the compactor, I would imagine, is mostly just making raw read/write calls while walking
the b-tree.

Anyway; this makes me wonder what happens when changes are made to a database during compaction.
The compaction processes working off of a snapshot of the database from the point that it
started, so it's not going to copy over new changes. Does that mean they get lost, or does
the compactor have extra smarts to run a second phase where it copies over all revs created
since the snapshot?

View raw message