Hi Greet, Basically i have 3 kind of request types run, edit and delete. Run request from a user(User1) will read a xml(user1.xml) of that user and then create a new xml(output1.xml) in the data base and once creation is done it will update the same user xml(user1.xml). Edit request from same user will edit the user1.xml and Delete request will delete User1.xml. So my question is while i am processing the Run request from the user1, i want to lock his xml(user1.xml) to block his concurrent request for edit or delete request till User1.xml is updated by Run request which is still processing. Hope this makes it clear.
Regards, Prasanth On Tue, Aug 9, 2011 at 2:35 AM, Geert Josten <geert.jos...@daidalos.nl>wrote: > Hi Prasanth,**** > > ** ** > > Just to make sure I understand your question correctly: you have one > request that reads one profile, and creates/updates another, but a second > request that is deleting the first profile? Or are you creates and updates > spanning multiple requests? Provided reads and creates/updates are in one > request, the read of the first profile already results in a read lock. > Another thread deleting this profile will either wait or mark it for > deletion in such a way that the first thread/request won’t notice..**** > > ** ** > > What kind of problems are you actually observing? Conflicting updates, > profile not found problems, something else?**** > > ** ** > > Kind regards,**** > > Geert**** > > ** ** > > *Van:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *Namens *Prasanth V J > *Verzonden:* dinsdag 9 augustus 2011 8:15 > *Aan:* General MarkLogic Developer Discussion > *Onderwerp:* Re: [MarkLogic Dev General] Locking in Marklogic**** > > ** ** > > Thanks Nuno for your quick reply.. :) > > > But now i come across the following situation. I have a profile xml(user > specific), based on which i will be creating some other xml dynamically once > this xml creation(depends upon input request types) is done i want to update > my profile xml with the some new values. Here is my problem. I got a request > to run some queries based on a particular profile xml, while i was > dynamically creating the other xml, i got another request to delete the same > profile xml. I want this request to be blocked till the first request is > completed. So my question is how can i lock this profile xml of that > particular user alone. If there is a way to lock this profile xml and say > if some other problem happened and server crashes before unlocking this > profile xml, how can i handle this scenario? > > > Thanks > Prasanth**** > > On Mon, Aug 8, 2011 at 8:04 AM, Nuno Job <nunojobpi...@gmail.com> wrote:** > ** > > In MarkLogic you have ACID transactions for free - you don't have to > implement code to ensure consistency.**** > > ** ** > > For performance reasons we separate processing queries from updates in > MarkLogic. Queries run in timestamped mode, meaning they have a read > consistent view of the database at a given point in time and therefor do not > require locks. Updates run with normal read write locks, so when you are > updating in MarkLogic you have ACID ensured. **** > > ** ** > > The semantics on mixing queries and updates are very flexible but I won't > go into details. If you are interested I suggest you read the developer > guide, page 12-22:**** > > http://developer.marklogic.com/pubs/4.2/books/dev_guide.pdf**** > > ** ** > > Thank you,**** > > Nuno**** > > ** ** > > On Mon, Aug 8, 2011 at 12:53 PM, Prasanth V J <vjprasa...@gmail.com> > wrote:**** > > Hi, > > When a transaction is happening in Marklogic which deals with editing or > manipulating an xml will ML acquire a lock on the xml being manipulated, > there by restricting the concorruent request to wait? or do we have to > implement this through code? > > Regards, > Prasanth**** > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general**** > > ** ** > > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general**** > > ** ** > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general