[MarkLogic Dev General] Re: updates and locks (Paul M)

Geert Josten Geert.Josten at daidalos.nl
Mon Apr 12 06:14:36 PDT 2010


Hi Paul,

> I usual default to admin user. I have suspicion that admin
> user may ignore locks (similar to how admin user sees deleted
> fragments) ?

Yes, see here: http://markmail.org/message/rympyw7tcl4qclzn

But the essence of what you observe is more complicated. The admin only ignores document locks that were acquired through lock-acquire. It is still possible to create dead-lock situations with admin users. Just update doc1, perform an eval in different transaction, update there the same doc1 and you have your dead-lock.

About your queries, the writing-lock (which lives only as long as the transactions, contrary to lock-acquire) is only acquired at the moment a document is actually updated. In your first query you have a long loop, but it has to terminate before you start updating the file. You might get different results if you update the same document before and after the for loop (provided it is not considered a conflicting update, which is disallowed)..

> P.S. When a trigger fires, what role and permission does the
> trigger use?

Hmm, good question. Anyone?

Kind regards,
Geert


drs. G.P.H. (Geert) Josten
Consultant


Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:geert.josten at daidalos.nl
http://www.daidalos.nl/

KvK 27164984

P Please consider the environment before printing this mail.
De informatie - verzonden in of met dit e-mailbericht - 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.



More information about the General mailing list