Bug 1148603
| Summary: | [GSS](6.4.0)HHH-9455 Hibernate AbstractCollectionPersister method processQueuedOps calls a deprecated method which has negative impact on the performance. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Gary Hu <ghu> | ||||
| Component: | Hibernate | Assignee: | Gail Badner <gbadner> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Simka <msimka> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.4.0 | CC: | bmaxwell, jmartisk, kkhan, msimka, smarlow | ||||
| Target Milestone: | DR11 | ||||||
| Target Release: | EAP 6.4.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1155389 (view as bug list) | Environment: | |||||
| Last Closed: | 2019-08-19 12:41:09 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1121629, 1155389 | ||||||
| Attachments: |
|
||||||
Created attachment 948676 [details] BZ1148603.patch This has been fixed upstream. Fixed for EAP 6.4.0. Fixed by Hibernate 4.2.16.Final upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1121629 Verified in EAP 6.4.0.DR11. |
org.hibernate.persister.collection.AbstractCollectionPersister.java: public void processQueuedOps(PersistentCollection collection, Serializable key, SessionImplementor session) throws HibernateException { if ( collection.hasQueuedOperations() ) { int nextIndex = getSize( key, session ); doProcessQueuedOps( collection, key, nextIndex, session ); } } Please note the line: int nextIndex = getSize( key, session ); It actually executes a query "select count xxx" which is expensive and has negative impact on performance. More importantly, in the method doProcessQueuedOps: @Deprecated protected void doProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SessionImplementor session) throws HibernateException { doProcessQueuedOps( collection, key, session ); } The param nextIndex is not even used. It appears that the method doProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SessionImplementor session) is already deprecated and is not supposed to be used any more. The method processQueuedOps should call doProcessQueuedOps(PersistentCollection collection, Serializable key, SessionImplementor session) and no need to invoke getSize method that is very expensive.