Skip to content

Commit

Permalink
HHH-14333 Pessimistic Lock causes FOR UPDATE on outer join statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Nov 17, 2020
1 parent 84e37c1 commit 33123d2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4350,7 +4350,7 @@ protected void createLoaders() {
if ( ! factory.getSessionFactoryOptions().isDelayBatchFetchLoaderCreationsEnabled() ) {
for ( LockMode lockMode : LockMode.values() ) {
//Trigger eager initialization
loaders.getOrBuildByLockMode( lockMode, this::createEntityLoader );
getLoaderByLockMode( lockMode );
}
//Also, we have two special internal fetch profiles to eagerly initialize in this case:
loaders.getOrCreateByInternalFetchProfileMerge( this::buildMergeCascadeEntityLoader );
Expand All @@ -4359,7 +4359,7 @@ protected void createLoaders() {
else {
//At least initialize this one: it's almost certain to be used,
//and also will allow to report mapping errors during initialization.
loaders.getOrBuildByLockMode( LockMode.NONE, this::createEntityLoader );
getLoaderByLockMode( LockMode.NONE );
}
}

Expand All @@ -4372,7 +4372,7 @@ protected UniqueEntityLoader buildRefreshCascadeEntityLoader(LockMode ignored) {
}

protected final UniqueEntityLoader getLoaderByLockMode(LockMode lockMode) {
return loaders.getOrBuildByLockMode( lockMode, this::createEntityLoader );
return loaders.getOrBuildByLockMode( lockMode, this::generateDelayedEntityLoader );
}

private UniqueEntityLoader generateDelayedEntityLoader(final LockMode lockMode) {
Expand Down

0 comments on commit 33123d2

Please sign in to comment.