Björn Zurmaar (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ecd86c...
) *commented* on HHH-14043 (
https://hibernate.atlassian.net/browse/HHH-14043?atlOrigin=eyJpIjoiYTkwMG...
)
Re: Two concurrent element shifts in a list damage database integrity. (
https://hibernate.atlassian.net/browse/HHH-14043?atlOrigin=eyJpIjoiYTkwMG...
)
Thanks for having a look at this issue, Christian. The example above uses optimistic
locking according to e1.getLockMode(foo1). This seems to be the default? This is also the
lock mode I got in Wildfly when I originally discovered the problem. I wasn’t aware you
can run hibernate without transaction management / locking.
I’m totally not an expert on this, but from my current point of view the lock mode
operates on a per table row basis. This would not be sufficient to protect against this
kind of problem. The root of the problem is that hibernate only updates the indices of the
list elements it thinks have changed. This is what effectively prevents locking from
kicking in here because the other table rows never get touched but have to be considered
to keep the indices sane. It should take into account that other indices might have
changed in the meantime.
(
https://hibernate.atlassian.net/browse/HHH-14043#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14043#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100129- sha1:3ed9692 )