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#xdmp: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

Reply via email to