> On Jul 7, 2015, at 11:43 PM, Brendan Duddridge <[email protected]> wrote:
> 
> The NSDocument's setFileURL method will be called if the document is moved by 
> another process, so I was going to override this and close the database and 
> re-set the CBLManager's URL and re-open it with the new URL.

That’s very prone to race conditions, since the method is called after the 
document is moved. 

> This could be problematic even without a document based database. A user 
> could easily copy the same database file to multiple devices and then start 
> replication.

It’s a lot less likely if the databases are invisibly housed in Application 
Support.

> Does the replicator automatically detect this situation and automatically 
> start replication from scratch? That would be ok if it did I think. Although 
> I don't know if the replicator would set a new unique UUID for one of the 
> databases so maybe this will be constantly problematic.

The replicator will reset, but it’ll happen whenever the ‘other’ copy of the 
database was the last one to replicate with that server. The database never 
changes its UUID.

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/6967F81F-0361-4398-B97A-B51325055BB8%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to