[hibernate-issues] [JIRA] (HHH-14043) Two concurrent element shifts in a list damage database integrity.

Björn Zurmaar (JIRA) jira at hibernate.atlassian.net
Fri Jun 19 03:11:13 EDT 2020


Björn Zurmaar ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ecd86c3dacd410c1f8c8da5 ) *commented* on HHH-14043 ( https://hibernate.atlassian.net/browse/HHH-14043?atlOrigin=eyJpIjoiNjQwM2VhYThkOTFmNDdhNGI4MWE0Y2VkZGJmMDg3Y2MiLCJwIjoiaiJ9 )

Re: Two concurrent element shifts in a list damage database integrity. ( https://hibernate.atlassian.net/browse/HHH-14043?atlOrigin=eyJpIjoiNjQwM2VhYThkOTFmNDdhNGI4MWE0Y2VkZGJmMDg3Y2MiLCJwIjoiaiJ9 )

Thank you very much for taking the time to look at my code. I really appreciate that!

I was under the impression that flushing is done automatically. The flushmode should only determine when this flush happens as far as i know. I also ran the code you provided with the exact same result as mine. Index 1 occurs two times and index 0 has vanished in the database. Consequently bar1 disappears from the list.

It’s not that the data expected is not written to the database. The problem is that hibernate only rewrites the affected indices. This is not sufficient to create transactional safety (in the sense of keeping the collection sane) from my point of view.

( https://hibernate.atlassian.net/browse/HHH-14043#add-comment?atlOrigin=eyJpIjoiNjQwM2VhYThkOTFmNDdhNGI4MWE0Y2VkZGJmMDg3Y2MiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14043#add-comment?atlOrigin=eyJpIjoiNjQwM2VhYThkOTFmNDdhNGI4MWE0Y2VkZGJmMDg3Y2MiLCJwIjoiaiJ9 )

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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100130- sha1:5f5b10c )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200619/22ad71ea/attachment-0001.html 


More information about the hibernate-issues mailing list