Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix contract_tpid_fkey-related race condition #11330

Merged
merged 8 commits into from
Oct 22, 2021
Prev Previous commit
Next Next commit
tentative fix for template ID constraint error
  • Loading branch information
S11001001 committed Oct 20, 2021
commit 4633c3137a78eb5629654714e2b8ee00dd838466
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ sealed abstract class Queries(tablePrefix: String, tpIdCacheMaxEntries: Long)(im
Applicative[ConnectionIO].pure(tpId)
}
.getOrElse {
surrogateTemplateIdFromDb(packageId, moduleName, entityName).map { tpId =>
for {
tpId <- surrogateTemplateIdFromDb(packageId, moduleName, entityName)
_ <- connection.commit
} yield {
surrogateTpIdCache.setCacheValue(packageId, moduleName, entityName, tpId)
tpId
}
Expand Down