incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Marshall <omarsh...@facilityone.com>
Subject Re: Document Timestamp On Replication
Date Tue, 03 May 2011 20:38:53 GMT
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:
http://wiki.apache.org/couchdb/Document_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:

http://guide.couchdb.org/draft/replication.html
http://guide.couchdb.org/draft/conflicts.html

-- 
Owen Marshall
FacilityONE
omarshall@facilityone.com | (502) 805-2126


Mime
View raw message