mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-09 12:44:49 +00:00
HHH-13526 Optimise HashMap lookup operations on ResourceRegistryStandardImpl xref
This commit is contained in:
parent
0f523c195a
commit
5699258aa2
@ -81,18 +81,16 @@ public void register(Statement statement, boolean cancelable) {
|
|||||||
public void release(Statement statement) {
|
public void release(Statement statement) {
|
||||||
log.tracev( "Releasing statement [{0}]", statement );
|
log.tracev( "Releasing statement [{0}]", statement );
|
||||||
|
|
||||||
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
|
final Set<ResultSet> resultSets = xref.remove( statement );
|
||||||
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
|
if ( resultSets != null ) {
|
||||||
if ( log.isDebugEnabled() && !xref.containsKey( statement ) ) {
|
closeAll( resultSets );
|
||||||
log.unregisteredStatement();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final Set<ResultSet> resultSets = xref.get( statement );
|
// Keep this at DEBUG level, rather than warn. Numerous connection pool implementations can return a
|
||||||
if ( resultSets != null ) {
|
// proxy/wrapper around the JDBC Statement, causing excessive logging here. See HHH-8210.
|
||||||
closeAll( resultSets );
|
log.unregisteredStatement();
|
||||||
}
|
|
||||||
xref.remove( statement );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
close( statement );
|
close( statement );
|
||||||
|
|
||||||
if ( lastQuery == statement ) {
|
if ( lastQuery == statement ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user