Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 98574 invoked from network); 21 Sep 2009 15:25:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Sep 2009 15:25:39 -0000 Received: (qmail 69906 invoked by uid 500); 21 Sep 2009 15:25:38 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 69833 invoked by uid 500); 21 Sep 2009 15:25:38 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 69823 invoked by uid 99); 21 Sep 2009 15:25:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:25:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.220.209 as permitted sender) Received: from [209.85.220.209] (HELO mail-fx0-f209.google.com) (209.85.220.209) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:25:28 +0000 Received: by fxm5 with SMTP id 5so2254559fxm.3 for ; Mon, 21 Sep 2009 08:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=YDm281JgadSg1aUgKXcepn+Fh5/U3W4w9ZVdXdwvfPE=; b=ucDbFqcsJwAO7s+FIqBSEeS4xFABpQNCxd/+QoEO6dFnKIO09FFq0sTOeLwHpN11Y3 +ZywXW9dIi66/n7iFKTLWQuBAOwVmdemnd4M1+lLzbxta+dN+Fx5cgfCHAxDSACXdnQZ tsK65LooTOPv2csKJD2NG+fYobEBc7tbnfoDc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=jN0aRxgqBOtVg9SL1lKtc/MEXvd9gK3D4o8IijgtOtiK6ONHud8G4A7X7CjXmlyQeK Rsqy/FDrOTk7xRUk8LOCaFFjs41UDxjrAy7xMRVHi3+CbmDmqE5G52BEh2NSdmp87yBx XpW83Ga03d4lByfWs68oFzk2LpVrHxhY0PJqU= MIME-Version: 1.0 Received: by 10.86.10.36 with SMTP id 36mr4591852fgj.61.1253546706582; Mon, 21 Sep 2009 08:25:06 -0700 (PDT) Date: Mon, 21 Sep 2009 17:25:06 +0200 Message-ID: Subject: add modified time to db header From: Benoit Chesneau To: dev@couchdb.apache.org Content-Type: multipart/mixed; boundary=0014852e194027c2120474181692 X-Virus-Checked: Checked by ClamAV on apache.org --0014852e194027c2120474181692 Content-Type: text/plain; charset=ISO-8859-1 Hi all, I've started today a patch that add modified date to teh db header in view of geeting last time a db was updated which would allow in case of a global db handler to get all changes since this date, or just get all new dbs created. Patch is attached and could be found in my repo : http://bitbucket.org/benoitc/couchdb/src/9733d08fc7b0/ It works and I can get db infos : {"db_name":"testdb","doc_count":0,"doc_del_count":1,"update_seq":3,"modified":"1253540241479553","purge_seq":0,"compact_running":false,"disk_size":12398,"instance_start_time":"1253540874651249","disk_format_version":5} Main problem actually is that it doesn't handle old dbs since header should be upgraded. I've read the code in couch_file but fail for now to understand the logic to read/rewrite header. I think I should first test if header is on version < 0.9 then 0.10 but... Any help would be appreciated. Also what do you think of this patch ? - benoit --0014852e194027c2120474181692--