Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25A4510ECA for ; Fri, 31 Jan 2014 18:00:46 +0000 (UTC) Received: (qmail 49147 invoked by uid 500); 31 Jan 2014 18:00:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 49084 invoked by uid 500); 31 Jan 2014 18:00:23 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 48567 invoked by uid 99); 31 Jan 2014 17:59:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 17:59:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.28 as permitted sender) Received: from [206.225.164.28] (HELO EXHUB020-1.exch020.serverdata.net) (206.225.164.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jan 2014 17:59:51 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.179]) by EXHUB020-1.exch020.serverdata.net ([206.225.164.28]) with mapi; Fri, 31 Jan 2014 09:59:29 -0800 From: Jens Alfke To: "user@couchdb.apache.org" Date: Fri, 31 Jan 2014 09:59:29 -0800 Subject: Re: Replication vs. Compaction Thread-Topic: Replication vs. Compaction Thread-Index: Ac8eri/kufM0zXNOT/a6riLiW8guag== Message-ID: References: <4AD73424-F7BB-49F4-ABC9-43A88D34BDCA@couchbase.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On Jan 31, 2014, at 9:46 AM, Mark Hahn wrote: > It wouldn't matter if it did. Within the same server linux short-circuit= s > 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 tra= nsport 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/writ= e calls while walking the b-tree. Anyway; this makes me wonder what happens when changes are made to a databa= se 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 ove= r new changes. Does that mean they get lost, or does the compactor have ext= ra smarts to run a second phase where it copies over all revs created since= the snapshot? =97Jens=