couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poyau, John" <>
Subject RE: Document Timestamp On Replication
Date Tue, 03 May 2011 20:54:50 GMT

Thank you for your reply.  I am aware of the issue that you mentioned and that is why I posted
my question to list.

One approach that I thought of is to use a separate document to hold the update_timestamp,

these documents would not get replicated (filtered out on replication). Documents that tracks
the update_timestamp would get created using a document update handler as you mentioned.

I posted my question looking to see if there were any another way to track document updates
even through replication. 

Again thank you

-----Original Message-----
From: Owen Marshall [] 
Sent: Tuesday, May 03, 2011 4:39 PM
Cc: Poyau, John
Subject: EXTERNAL: Re: Document Timestamp On Replication

On 05/03/2011 10:38 AM, Poyau, John wrote:
> What is the couchdb way of update the documents update_timestamp on replication.

Are you using continuous replication? If so, _don't ever do this_!

If you do, you will likely end up passing the same document back and forth between nodes.
I.E: User pushes doc to node A, node A replicates to node B, node B bumps the update_timestamp,
node A pulls the new document, node A bumps the update_timestamp... repeat ad nauseum.

Even if you aren't using continuous replication, you still _shouldn't do this_! Replicate
your documents and handle conflicts when they happen.

If for some reason you have a truly good reason, you might be able to accomplish this with
update handlers:

But if you are not 100% completely positively sure, I'd urge you to read the excellent CouchDB
guide on replication and on conflicts:

Owen Marshall
FacilityONE | (502) 805-2126

View raw message