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 Wed, 04 May 2011 20:21:38 GMT
On 05/04/2011 04:13 PM, Eli Stevens (Gmail) wrote:
> 11:59 - Document D inserted on Node 2.  Replication hasn't happened yet.
> 12:00 - First access of view page 1 on Node 1.  Only A, B, C are present.
> 12:01 - D is replicated to Node 1.

Mmm, yes, you're absolutely correct; depending on that view would carry
with it the risk of an update race. It would (likely) work if replicates
were consistently low-latency, but that's not a guarantee.

Correct me if I'm wrong, but that view would work if:

1. you capture last_seq from _changes pre-view run
2. run the view, capturing the output
3. check _changes for any updates since=your captured last_seq
4. filter those IDs out of your captured view.

Yuck.

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


Mime
View raw message