All, I have a reader.xqy, which does only read operation and does not write to the forest, except for one doc insert. I don't want that reader query to obtain lock on all referenced documents, so I move that document insert logic to a seperate writer.xqy and invoke it from reader.xqy.
My current logic is if random-xml already exists DO NOTHING else INSERT RANDOM-XML The problem I am facing is, when I invoke the reader xqy using multiple threads concurrently, I am ending up with duplicate writer xmls even though I have validations in place. How do I make sure that even if the reader xml is invoked concurrently by several threads, only one of the invocation has to insert an xml? Note: I need that random-xml inserted, before the reader.xqy completes execution and the URI of the random-xml involves dynamically generated ID and NOT a constant URI. Thanks in advance Raghu
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general