Subtransactions tracking/preventions
Is your feature request related to a problem? Please describe.
https://about.gitlab.com/blog/2021/09/29/why-we-spent-the-last-month-eliminating-postgresql-subtransactions/
Describe the solution you'd like
It would be great if Isolator could track subtransactions and report them. The feature MUST be optional (for now):
Isolator.configure do |config|
# Must be set to a non-zero value to be activated (so, default is 0)
config.max_substransactions_depth = 32
end
Additional context
Gitlab implementation: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67918/diffs
Rails discussion: https://github.com/rails/rails/pull/44518
It would also be great if we could track queries or transactions to a different database cluster. Stuff like:
Cluster1Model.transaction do
Cluster2Model.transaction do
#...
end
end
Hey @composerinteralia
It would also be great if we could track queries or transactions to a different database cluster
Added here https://github.com/palkan/isolator/commit/7824716033c82125bc7f23908410c87a638dd3de