You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Andrew Melo <an...@gmail.com> on 2009/10/22 17:03:31 UTC

Attachments and conflicts

Hello all,

I'm working on a project to coallate various log files written by
different programs into a single couch document to make some debugging
we've been working on easier. The way I have it set up is there are
different perl scripts that sit and watch various log
files/directories, and once a new log shows up, it attaches it to the
document that corresponds to a per-task document in the DB.

If one log, agentA uploads logA as an attachment to the document, and
then agentB uploads logB as an attachment to the document (but doesn't
mention logA), what happens? Will a conflict get raised? Will logA get
removed?

best regards,
Andrew
--
Andrew Melo
Andrew.Melo@gmail.com

Re: Attachments and conflicts

Posted by Oliver Boermans <bo...@gmail.com>.
Hi Andrew

2009/10/23 Andrew Melo <an...@gmail.com>:
> If one log, agentA uploads logA as an attachment to the document, and
> then agentB uploads logB as an attachment to the document (but doesn't
> mention logA), what happens? Will a conflict get raised? Will logA get
> removed?

You can have multiple attachments per CouchDB document. As long as the
attachments are uploaded with different ids they won’t overwrite each
other.

HTH
Ollie