HHH-13526 Optimise HashMap lookup operations on ResourceRegistryStandardImpl xref
This commit is contained in:
parent
7d54b59743
commit
68b1b650e9
|
@ -81,18 +81,16 @@ public class ResourceRegistryStandardImpl implements ResourceRegistry {
|
|||
public void release(Statement statement) {
|
||||
log.tracev( "Releasing statement [{0}]", statement );
|
||||
|
||||
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
|
||||
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
|
||||
if ( log.isDebugEnabled() && !xref.containsKey( statement ) ) {
|
||||
log.unregisteredStatement();
|
||||
}
|
||||
else {
|
||||
final Set<ResultSet> resultSets = xref.get( statement );
|
||||
final Set<ResultSet> resultSets = xref.remove( statement );
|
||||
if ( resultSets != null ) {
|
||||
closeAll( resultSets );
|
||||
}
|
||||
xref.remove( statement );
|
||||
else {
|
||||
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
|
||||
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
|
||||
log.unregisteredStatement();
|
||||
}
|
||||
|
||||
close( statement );
|
||||
|
||||
if ( lastQuery == statement ) {
|
||||
|
|
Loading…
Reference in New Issue