Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1148603 - [GSS](6.4.0)HHH-9455 Hibernate AbstractCollectionPersister method processQueuedOps calls a deprecated method which has negative impact on the performance.
[GSS](6.4.0)HHH-9455 Hibernate AbstractCollectionPersister method processQueu...
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
6.4.0
Unspecified Unspecified
high Severity high
: DR11
: EAP 6.4.0
Assigned To: Gail Badner
Martin Simka
:
Depends On:
Blocks: 1121629 1155389
  Show dependency treegraph
 
Reported: 2014-10-01 16:22 EDT by Gary Hu
Modified: 2015-02-26 19:55 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1155389 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
BZ1148603.patch (2.13 KB, patch)
2014-10-20 15:57 EDT, Gary Hu
no flags Details | Diff

  None (edit)
Description Gary Hu 2014-10-01 16:22:39 EDT
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.
Comment 1 Gary Hu 2014-10-20 15:57:32 EDT
Created attachment 948676 [details]
BZ1148603.patch
Comment 4 Gail Badner 2014-10-21 18:38:01 EDT
This has been fixed upstream.
Comment 5 Gail Badner 2014-11-20 22:08:19 EST
Fixed for EAP 6.4.0.
Comment 6 Kabir Khan 2014-11-21 06:35:47 EST
Fixed by Hibernate 4.2.16.Final upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1121629
Comment 7 Jan Martiska 2014-11-27 04:26:21 EST
Verified in EAP 6.4.0.DR11.

Note You need to log in before you can comment on or make changes to this bug.