isolator icon indicating copy to clipboard operation
isolator copied to clipboard

Subtransactions tracking/preventions

Open palkan opened this issue 3 years ago • 2 comments

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

palkan avatar Jun 10 '22 15:06 palkan

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

composerinteralia avatar Aug 31 '23 02:08 composerinteralia

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

palkan avatar Oct 21 '23 02:10 palkan