<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 4, 2015 at 4:43 AM, Etienne Dysli-Metref <span dir="ltr"><<a href="mailto:etienne.dysli-metref@switch.ch" target="_blank">etienne.dysli-metref@switch.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'm reading the current unreleased code of<br>
org.opensaml.storage.impl.JPAStorageService and seeing it is often<br>
requesting locking (with javax.persistence.LockModeType), especially<br>
pessimistic locking. Could someone explain the rationale behind<br>
requesting specific lock types instead of, for example, letting the<br>
database decide which locking level is appropriate for a query?<br></blockquote><div><br></div><div>As I recall the databases we tested didn't do a good job of selecting the correct lock[1].</div><div>However the locking code was added before the retry code, so it may not be as necessary anymore.</div><div>I recall doing some simple tests to see if the locking code slowed down the tests significantly and the results were negligible.</div><div><br></div><div>--Daniel Fisher</div><div><br></div><div>[1] <a href="https://issues.shibboleth.net/jira/browse/OSJ-101">https://issues.shibboleth.net/jira/browse/OSJ-101</a></div><div><br></div></div></div></div>