Hi Robert, xdmp:document-lock() should return details of your lock, can you send them? It contains information about when and by who it was inserted. Note: the timeout parameter of xdmp:lock-acquire() is not a timeout on acquiring a lock, but how long the lock will persist.
Kind regards, Geert > Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > Runstein, Robert E. (Contr) (IS) > Sent: vrijdag 25 september 2009 17:16 > To: [email protected] > Subject: [MarkLogic Dev General] Finding locks > > Thanks, Mike. RTFM is always good advice. > > Will xdmp:lock-release release a lock that was not created by > an explicit call to xdmp:lock-acquire? I was running a > series of JUnit tests using ad hoc queries via XDBC while > someone else was running RecordLoader and maxing out the CPU. > There was no commonality between the test documents and the > documents being processed by RecordLoader. My tests hung so I > killed the JUnit process. When the RecordLoader finished and > CPU utilization went back to nominal I tried to rerun my > tests. The first test hung trying to delete one of the test > documents inserted by the previous test run (by the same > user). I killed the test process and tried to delete the > document as the Admin user via cq and this hung as well. > > Not knowing about the xdbc:release function, I restarted the > database to clear the lock. My tests do not explicitly call > xdmp:lock-acquire. > > I'm wondering a few things: > 1. Would xdmp:lock-release have released the lock? > 2. How did I end up with the lock in the first place? (When > the doc was inserted did the lock not get released because of > the load on the server?) > > 3. How can I avoid this in the future? Can I set a timeout > for how long another process should wait to acquire the lock > before it errors out? > > I looked in the error log and did not see any thing that > indicated that a deadlock occurred. > > Bob > > > Is there a way to find documents that are locked using the > Admin Console? If not, is there a query than can be run in > cq to find locked documents? > > http://developer.marklogic.com/pubs/4.1/apidocs/Ext-9.html#xdm > p:document-locks > <http://developer.marklogic.com/pubs/4.1/apidocs/Ext-9.html#xd > mp:document-locks> > says that it "Returns the locks for all documents and > directories in the database if no parameter is given." > > -- Mike > > _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
