Create RuboCop rule to prevent sub-transactions
One outcome from Root cause identification of PG Sub-transaction related performance degradations is to proactively prevent the creation of sub-transactions through Rails. See #338346 (comment 653199171) for more context
Methods to disallow
-
!68576 (merged) - transaction(requires_new: true)
-
!68594 (merged) - safe_ensure_unique
-
!68594 (merged) - Rails' create_or_find_by
-
!68594 (merged) - Rails' create_or_find_by!
-
!69315 (merged) - safe_find_or_create
-
!69315 (merged) - safe_find_or_create!
-
!69315 (merged) - with_fast_read_statement_timeout
Edited by Peter Leitzen