Files
Jeremy Evans 9f2abaf176 Avoid sleeping inside transaction in runtime github route
This actually avoids the transaction completely.  Previously,
the behavior was:

* BEGIN
* GithubCacheEntry.create
  * SELECT to check for existing object
  * INSERT
* Upload blob
* GithubCacheEntry#update (UPDATE)
* COMMIT

Now behavior is:

* SELECT to check for existing object
* Upload blob
* GithubCacheEntry.create
  * SELECT to check for existing object
  * INSERT

I don't think the sleeping inside transaction is related to the H12
errors, but when increasing the Puma threads beyond the database
connection pool size, you definitely want to avoid sleeping inside
transactions.

Best reviewed without whitespace differences.
2025-06-12 07:06:24 +09:00
..