netfox icon indicating copy to clipboard operation
netfox copied to clipboard

Support nested RollbackSynchronizers

Open elementbound opened this issue 11 months ago • 0 comments

:sparkles: Description

RollbackSynchronizer explores all the children of its configured root, recursively, to look for nodes implementing _rollback_tick. This means that for nested RollbackSynchronizers, multiple synchronizers may end up calling _rollback_tick on the same node.

Use case

Multiple requests were received about having nested RollbackSynchronizers - usually for things that may be implemented with workarounds but can be tedious.

Distribution

netfox core

Notes

  • Possible approaches:
    • Add a flag so that RollbackSynchronizer won't look recursively
    • When looking recursively, disregards nodes belonging to a different RollbackSynchronizer
  • In theory, nested RollbackSynchronizers are already possible in a way
    • When spawning the nested node at runtime, the parent synchronizer will not gather nodes again
    • This means that the child RBS will have its own set of nodes to manage, distinct from the parent RBS
    • This holds until process_settings() is called for any reason on the root RBS

elementbound avatar Feb 21 '25 21:02 elementbound