[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5591) ConcurrentStatisticsImpl#queryExecuted() does not update queryExecutionMaxTimeQueryString

Cédrik LIME (JIRA) noreply at atlassian.com
Fri Sep 24 14:06:57 EDT 2010


ConcurrentStatisticsImpl#queryExecuted() does not update queryExecutionMaxTimeQueryString
-----------------------------------------------------------------------------------------

                 Key: HHH-5591
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5591
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.0.CR1, 3.5.6
            Reporter: Cédrik LIME
            Priority: Minor


The new (3.5.0) concurrent statistics classes broke the logging of the longest query.
Path to make it work again:
in {{ConcurrentStatisticsImpl#public void queryExecuted(String hql, int rows, long time)}}
replace
{code:java|title=ConcurrentStatisticsImpl#queryExecuted()}
for ( long old = queryExecutionMaxTime.get();
    ( time > old ) && ( isLongestQuery = !queryExecutionMaxTime.compareAndSet( old, time ) );
        old = queryExecutionMaxTime.get() ) {
        // nothing to do here given the odd loop structure...
}
{code}
with
{code:java|title=ConcurrentStatisticsImpl#queryExecuted()}
for ( long old = queryExecutionMaxTime.get();
    ( isLongestQuery = time > old ) && ( !queryExecutionMaxTime.compareAndSet( old, time ) );
        old = queryExecutionMaxTime.get() ) {
        // nothing to do here given the odd loop structure...
}
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list