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?