Explicit locking in JPAStorageService
Daniel Fisher
dfisher at vt.edu
Wed Nov 4 18:10:01 EST 2015
On Wed, Nov 4, 2015 at 4:43 AM, Etienne Dysli-Metref <
etienne.dysli-metref at switch.ch> wrote:
> I'm reading the current unreleased code of
> org.opensaml.storage.impl.JPAStorageService and seeing it is often
> requesting locking (with javax.persistence.LockModeType), especially
> pessimistic locking. Could someone explain the rationale behind
> requesting specific lock types instead of, for example, letting the
> database decide which locking level is appropriate for a query?
>
As I recall the databases we tested didn't do a good job of selecting the
correct lock[1].
However the locking code was added before the retry code, so it may not be
as necessary anymore.
I recall doing some simple tests to see if the locking code slowed down the
tests significantly and the results were negligible.
--Daniel Fisher
[1] https://issues.shibboleth.net/jira/browse/OSJ-101
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20151104/3573feae/attachment.html>
More information about the dev
mailing list