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 479AC3A17 for ; Wed, 4 May 2011 16:15:17 +0000 (UTC) Received: (qmail 55868 invoked by uid 500); 4 May 2011 16:15:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 55830 invoked by uid 500); 4 May 2011 16:15:15 -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 55822 invoked by uid 99); 4 May 2011 16:15:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 16:15:15 +0000 X-ASF-Spam-Status: No, hits=3.6 required=5.0 tests=FS_REPLICA,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of omarshall@facilityone.com designates 216.135.43.146 as permitted sender) Received: from [216.135.43.146] (HELO secure.facilityone.com) (216.135.43.146) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 16:15:10 +0000 Received: from [192.168.10.152] ([216.135.43.146]) (authenticated user omarshall@facilityone.com) by secure.facilityone.com (Kerio Connect 7.1.3) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)); Wed, 4 May 2011 12:14:48 -0400 Message-ID: <4DC17B73.3010407@facilityone.com> Date: Wed, 04 May 2011 12:14:43 -0400 From: Owen Marshall User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: user@couchdb.apache.org CC: "Poyau, John" Subject: Re: Document Timestamp On Replication References: <9946CE35511F1449ADF88A3F647DFE2816B0602907@HVXMSP8.us.lmco.com> <4DC067DD.5070508@facilityone.com> <9946CE35511F1449ADF88A3F647DFE2816B06F1724@HVXMSP8.us.lmco.com> <4DC163B2.10502@facilityone.com> <9946CE35511F1449ADF88A3F647DFE2816B06F1FA1@HVXMSP8.us.lmco.com> In-Reply-To: <9946CE35511F1449ADF88A3F647DFE2816B06F1FA1@HVXMSP8.us.lmco.com> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF221B9EA19E622E00A1EC650" --------------enigF221B9EA19E622E00A1EC650 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/04/2011 11:29 AM, Poyau, John wrote: > -We want to keep track of the time that a document is added/updated in = a source database Then you definitely want an updated field per-document. Implementing this varies with your needs. You could use a single timestamp that gets clobbered each time, if you don't need a huge auditing trail. You could also do a list of timestamps if it would prove helpful. One other technique that I'm especially fond of is to store changes as attachments to each document. This gives you great audit trails -- who made what change when. You could go so far as to store the full document state before the change. But if you don't need that level of auditing, a timestamp field is the way to go. > -We want to keep track of the time that a document get replicated to a = target databases on replication. Don't. Don't don't don't. But because I hate it when the answer is "you're doing it wrong" and nothing else, some notes: * You will definitely want to separate the replication time from the update time (as they clearly aren't the same thing.) * Further, that *cannot* go in the document, clearly. * You'd need at a minimum filtered/named replication to send the documents you want, and an update handler to put the "replicated time" in some other document. Again though, you never answered the simple question of *why* you want to know this. Let me be clear: what you are trying to do adds a bunch of complexity to your documents, your replication, and your program. And I'm not sure why you want to do it so badly. What problem do you think you are solving by storing the replicated time?= --=20 Owen Marshall FacilityONE omarshall@facilityone.com | (502) 805-2126 --------------enigF221B9EA19E622E00A1EC650 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3Be3YACgkQcoY1cxL6GH0gJQCglgxMmh6osL3s02qLF9SMbE5i Z4IAn3TlT+DKuksX0aeNTA7EYvl0Ylng =8gVO -----END PGP SIGNATURE----- --------------enigF221B9EA19E622E00A1EC650--