-
Task
-
Resolution: Done
-
Major
-
4.14.0
-
None
Finalizers are evil and must die. Most of them got killed off as part of JBTM-294. The remaining pain point was transactions themselves, hence JBTM-811.
Unfortunately the StateManager subclass BasicAction has has a finalizer, so removing the StateManager one does not entirely fix the issue for transactions types derived from BasicAction, which is pretty much all of them.
Nuking the BasicAction finalizer completely is probably overkill - in certain use cases it is handy to have the cleanup as a safetynet. In the majority of use cases however, cleanup is already provided by transaction timeouts via the reaper. Thus we benefit from the finalizer only in certain scenarios, whilst paying the price for every transaction.
Make the finalizer optional via a config flag.