Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 55753 invoked from network); 24 Jan 2011 20:00:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 20:00:56 -0000 Received: (qmail 15887 invoked by uid 500); 24 Jan 2011 20:00:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 15748 invoked by uid 500); 24 Jan 2011 20:00:54 -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 15740 invoked by uid 99); 24 Jan 2011 20:00:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 20:00:54 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.103.221.49] (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 20:00:45 +0000 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110124200021.RXLA23441.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Mon, 24 Jan 2011 20:00:21 +0000 Received: from [192.168.0.12] (really [86.12.69.109]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110124200021.LXVV20122.aamtaout01-winn.ispmail.ntl.com@[192.168.0.12]> for ; Mon, 24 Jan 2011 20:00:21 +0000 Message-ID: <4D3DDA42.1040807@ianhobson.co.uk> Date: Mon, 24 Jan 2011 20:00:02 +0000 From: Ian Hobson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: Using the API to tell if a compact has been done References: <4D3DBBBE.30902@databill.com> In-Reply-To: <4D3DBBBE.30902@databill.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=x3xKdyL-6TAA:10 a=8nJEP1OIZ-IA:10 a=mV9VRH-2AAAA:8 a=VHhtZdrQbGhalq-FwgwA:9 a=uGxDLW9TVdtG0mtWb3kA:7 a=8QzUcAwQq8zEg_X2aIkXAcA1wikA:4 a=wPNLvfGTeEIA:10 a=rnXrtgnGNfTMYZG6:21 a=Zk11WB5GtH-91O3V:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On 24/01/2011 17:49, Wayne Conrad wrote: > I've subscribed again, from another email address, because the list > decided that my first subscribtion was a eeeeevil spammer. I hope > that's OK. Anyhow... > > I've written a cron job that periodically compacts all databases on > all servers, but it needs an automated test, and an automated test > needs a way to know that compaction happend (or, at least, was > triggered). Other than seeing the file size change, is there anything > I can do from the API that will show that my cron job caused > compaction to happen? > Hi Wayne, If you can create the database you are to compact, then you can use the rev=??? parameter. Set up the database, and note the rev of a document (= oldrev) Update the document (creating _rev=newrev). oldrev is now on disk, but not normally available. Read the old version using the rev=oldrev parameter. Trigger the compaction and wait for it to finish (A 1 record database won't take long to compact :) ) Read the old record again. This time it won't be found if the compaction has run. See http://wiki.apache.org/couchdb/HTTP_Document_API#Accessing_Previous_Revisions Regards Ian