Hibernate-core version >= 5.6.1-Final breaks batching

Ok so I’m a dev in my company and created part of a batch processing chain using hibernate-core: 5.4.5.Final. We’re dealing with excessive amounts of data and we’re using Postgres and Oracle DBs.

Few days ago I said ok, time to upgrade dependencies. So I went from 5.4.5.Final to 5.6.7.Final (last version which supports our Java 8).

Afterwards we noticed that a job took 25 mins instead of 3 min 30!
So after painful analysis and log tracing I realized that batch inserting & updating stopped working.
I continued to check different versions of Hibernate to see where exactly the break happens, and it turns out that version 5.6.0.Final is the last working version. From then on batching simply won’t do, and I don’t know why…

I tracked the thing down using

DEBUG logging of org.hibernate.engine.jdbc.batch.
Version 5.6.0.Final prints a lot of statements like “Reusing batch statement” and “Executing batch size: 499”

Successive versions don’t print anything. Cause it won’t do it anymore, making everything painfully slow.
Nobody else ever had this issue?

Hi @AntiBit82 ,

I see that 5.6.1 version contains [HHH-14901] - Hibernate JIRA that may be the cause of the batch processing stop working. Can you please open a Jira ticket with a reproducer?

Thanks a lot.

well… I would, if I knew where or how…

This is the place where you can open a Jira ticket Hibernate ORM - Issues - Hibernate JIRA and here a project that can help you create a test case GitHub - hibernate/hibernate-test-case-templates: Templates and examples to report issues to Hibernate

Ok thx, I did my best to create some understandable issue:

Maybe it’s just an error on my side, who knows. Though I wouldn’t expect a version upgrade to break existing functionality, but as we all know… :disguised_face: