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 9B72110E06 for ; Mon, 8 Jul 2013 16:48:35 +0000 (UTC) Received: (qmail 9999 invoked by uid 500); 8 Jul 2013 16:48:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9699 invoked by uid 500); 8 Jul 2013 16:48:29 -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 9690 invoked by uid 99); 8 Jul 2013 16:48:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 16:48:28 +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.32 as permitted sender) Received: from [206.225.164.32] (HELO EXHUB020-5.exch020.serverdata.net) (206.225.164.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 16:48:22 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.191]) by EXHUB020-5.exch020.serverdata.net ([206.225.164.32]) with mapi; Mon, 8 Jul 2013 09:47:59 -0700 From: Jens Alfke To: "user@couchdb.apache.org" Date: Mon, 8 Jul 2013 09:47:58 -0700 Subject: Re: Purging documents and view invalidation Thread-Topic: Purging documents and view invalidation Thread-Index: Ac57+ucN344B+ICWTpyMRHJPwpHlfA== Message-ID: References: <4452E2B7937E5944BDA554F6A6D5EB363DDA6218@abn-exch1b.green.sophos> <2230614989236312791@unknownmsgid> <3128971710354279103@unknownmsgid> <4452E2B7937E5944BDA554F6A6D5EB363DDA7400@abn-exch1b.green.sophos> 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 Jul 8, 2013, at 12:17 AM, Jason Smith wrote: > The database has a purge_seq value which tracks the number of purges. I d= o > not recall if that is factored into the replication ID. It should be. For compatibility reasons [with TouchDB / Couchbase Lite] I=92d love to kno= w more about this. Is there any description other than the source code? > To me, purging is as if a document had never existed. A replication shoul= d > recreate it (unless you change your filter policy or validate_doc_update)= . Yup. I=92ve heard from several people writing mobile apps who need somethin= g like this. Their mobile database doesn=92t have room for everything on th= e central server, so they want to replicate subsets of it, and then if the = client-side filter changes they need to be able to nuke the documents that = aren=92t in the new subset so the user=92s phone doesn=92t pop.=20 If the purged docs could never be pulled again, this would break down when = the user changed the filter such that a once-valid document was now valid a= gain. (A reminder to everyone that the CouchDB architecture and replication proto= col aren=92t only used on big-iron servers. They also need to work on phone= s and netbooks and Raspberry Pi=92s whose available storage may be =91only= =92 a few hundred megs :) > CouchDB purge is like Git rebase: sure it is dangerous, but that's becaus= e > it is powerful; and sometimes power users need power tools. +1 :) =97Jens=