Re: Urgent assistance with locking behaviour of existdb
Adam Retter <[email protected]> Tue, 14 Oct 2025 09:59:14 +0200
| Newsgroups | gmane.text.xml.exist |
|---|---|
| Message-ID | <CAJKLP9YtvdV=qekrgZ5DgBgvWxBuknyMtoYyM4PZsxSeM4Px5Q@mail.gmail.com> |
--===============0749832675995095151== Content-Type: multipart/alternative; boundary="000000000000399d69064119c363" --000000000000399d69064119c363 Content-Type: text/plain; charset="UTF-8" Hi Willem, In eXist-db 5.x.x and 6.x.x, the XQuery (if stored in the database) is treated as any other document, and so it is locked for the duration of operations that happen upon it. Unfortunately this means that whilst a query is executing the document holding that query will keep a READ lock on the document. A document may have many either a single write lock, or one or more read locks. This means that the query can only be updated by one person/client at a time, but that multiple clients can run the query in parallel. I am not sure how a deadlock could occur with this. Can you provide some further information about your issue, and how to reproduce it please? Thanks, Adam. On Tue, 14 Oct 2025 at 08:53, Willem van der Westhuizen <[email protected]> wrote: > Hi > > We use existdb extensively to run xqueries on our external databases, > couchdb and others. We dont use the existdb datastore for our data. > > We used to run on an old 3.3.3 version of existdb, and recently migrated > to 6.2. Since then we have found that existdb locks the xquery that is > being executed, causing deadlocks that eventually locks up the server. > Is there an easy way to tell existdb to revert to the older locking > behaviour that does not lock up the xquery being run? > > > Regards > > -- > Willem van der Westhuizen > +27 82 9200718 > > > > _______________________________________________ > Exist-open mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/exist-open > -- Adam Retter eXist Core Developer { United Kingdom } [email protected] --000000000000399d69064119c363 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><br></div><div>Hi Willem,</div><div><br></div><div>In= eXist-db 5.x.x and 6.x.x, the XQuery (if stored in the database) is treate= d as any other document, and so it is locked for the duration of operations= that happen upon it. Unfortunately this means that whilst a query is execu= ting the document holding that query will keep a READ lock on the document.= </div><div><br></div><div>A document may have many either a single write lo= ck, or one or more read locks. This means that the query can only be update= d by one person/client at a time, but that multiple clients can run the que= ry in parallel.</div><div><br></div><div>I am not sure how a deadlock could= occur with this. Can you provide some further information about your issue= , and how to reproduce it please?</div><div><br></div><div>Thanks, Adam.</d= iv><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" cl= ass=3D"gmail_attr">On Tue, 14 Oct 2025 at 08:53, Willem van der Westhuizen = <<a href=3D"mailto:[email protected]">[email protected]</a>> wrote:<b= r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex= ;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br> <br> We use existdb extensively to run xqueries on our external databases, <br> couchdb and others. We dont use the existdb datastore for our data.<br> <br> We used to run on an old 3.3.3 version of existdb, and recently migrated <b= r> to 6.2. Since then we have found that existdb locks the xquery that is <br> being executed, causing deadlocks that eventually locks up the server. <br> Is there an easy way to tell existdb to revert to the older locking <br> behaviour that does not lock up the xquery being run?<br> <br> <br> Regards<br> <br> -- <br> Willem van der Westhuizen<br> +27 82 9200718<br> <br> <br> <br> _______________________________________________<br> Exist-open mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Exist= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/exist-open" rel=3D"= noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/= exist-open</a><br> </blockquote></div><div><br clear=3D"all"></div><div><br></div><span class= =3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s= ignature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Adam Retter<br><br>eX= ist Core Developer<br>{ United Kingdom }<br><a href=3D"mailto:adam@exist-db= .org" target=3D"_blank">[email protected]</a><br></div></div></div></div></= div></div> --000000000000399d69064119c363-- --===============0749832675995095151== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0749832675995095151== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Exist-open mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/exist-open --===============0749832675995095151==--