Hibernate ActionQueue.sort() removes entities from insertion batches

Description

When committing transaction with batch insertions using SessionFactory, there is an error in ActionQueue.InsertActionSorter.sort(insertions), where could be some entities from batches removed. Lines 759 - 815 in Hibernate 5.2.10.Final. When in inner loop is called this.latestBatches.remove more than once, then some entity could have multiple occurence in this.latestBatches, other one could disappear.

Activity

Show:

Christian Beikov April 8, 2022 at 1:31 PM

Since no test case was provided for years, I'll close this issue as out of date. I also believe it will most probably not be an issue any more in 6.0.
If this still is an issue for you, please create a new issue with a test case that reproduces the problem.

Nathan Xu December 25, 2019 at 4:18 PM

It seems has removed the double removing and replace it with single removing, so this ticket could have been fixed.

Former user March 1, 2018 at 6:09 AM

, there have been several bugfixes related to this in recent releases. Please let us know if this is still an issue using 5.2.14. If it is, then please attach a runnable test case that reproduces your issue. You can find test templates at: https://github.com/hibernate/hibernate-test-case-templates.

Out of Date

Details

Assignee

Reporter

Labels

Worked in

Components

Priority

Created August 11, 2017 at 11:39 AM
Updated April 8, 2022 at 1:31 PM
Resolved April 8, 2022 at 1:31 PM