Looks mostly right to me. #8 isn't a conflict though. #3 requires of course neither node is an ancestor of the other. #4 tests out as non-conflicting for me.
You can get away with a little order dependence on insertions, but you hit trouble when there's any deletion or overwriting. Note that in each of the "conflict" examples there's a proper way to do the request that won't have a conflict. -jh- On Oct 28, 2010, at 9:52 AM, [email protected] wrote: > So let me see if I've got this right: > > 1. Two xdmp:document-insert()s on the same URI -> conflict > 2. Two xdmp:node-replace()s on the same doc, same node -> conflict > 3. Two xdmp:node-replace()s on the same doc, different nodes -> no conflict > 4. Two xdmp:node-insert-after()s on the same node -> conflict (because order > would matter?) > 5. Two xdmp:document-add-properties()s on the same doc -> conflict > 6. Two xdmp:document-set-property()s on the same doc, same property -> > conflict > 7. Two xdmp:document-set-property()s on the same doc, different properties -> > no conflict > 8. xdmp:document-insert() and xdmp:document-add-properties() on the same doc > -> conflict > > I suppose I could just set up a test a run through them all to find out. > > > From: [email protected] > Date: Thu, 28 Oct 2010 08:49:08 -0700 > To: [email protected] > Subject: Re: [MarkLogic Dev General] Conflicting updates > > Just to clarify, the rule on conflicting updates is that all update actions > you specify as part of a request should be able to be executed in any order > with the same result. If that's not true, it's a conflicting update. > There's various reasons for this, the easiest of which is that XQuery is a > functional language and this is an aspect of that. > > It means you can't, for example, add a node and then give it a child node. > Because that's order dependent. Nor can you delete a node and then delete > its parent. Again, order dependent. > > You very much can, however, update the same document multiple times in the > same transaction, so long as you're dealing with different parts of the > document so that execution order of updates isn't important. > > Writing the same document multiple times in a transaction would be, as Ryan > says, conflicting. > > -jh- > > On Oct 28, 2010, at 3:08 AM, [email protected] wrote: > > That error usually means that two updates are being attempted on a document > in the same transaction. I looked at the code and I'm not seeing two updates > so I'm wondering if maybe two docs are being written with the same URI in the > set of documents you are loading? > > From: [email protected] > To: [email protected] > Date: Thu, 28 Oct 2010 12:11:45 +0530 > Subject: [MarkLogic Dev General] (no subject) > > Hi, > > I am using the attached files to manipulate the xml data and then insert in > ML DB using record loader. > > I am getting the following error: > XDMP:OCNFLICTINGUPDATE > > Please let me know what I am doing wrong > > Thnaks, > Pragya > **************** CAUTION - Disclaimer ***************** > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely > for the use of the addressee(s). If you are not the intended recipient, > please > notify the sender by e-mail and delete the original message. Further, you are > not > to copy, disclose, or distribute this e-mail or its contents to any other > person and > any such actions are unlawful. This e-mail may contain viruses. Infosys has > taken > every reasonable precaution to minimize this risk, but is not liable for any > damage > you may sustain as a result of any virus in this e-mail. You should carry out > your > own virus checks before opening the e-mail or attachment. Infosys reserves > the > right to monitor and review the content of all messages sent to or from this > e-mail > address. Messages sent to or from this e-mail address may be stored on the > Infosys e-mail system. > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > > _______________________________________________ General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general_______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > _______________________________________________ General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general_______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
