Skip to content

Refactor to fix memory leaks

Memory Leak Fixes & Refactoring

EGPProtocol

  • Fixed incorrect condition in _create_id_to_request pop operation

MagicLinkLayerProtocol

  • Replaced dynamic namedtuple with explicit QueueItem class for better type annotations
  • Introduced Delivery object to track deliveries in MagicDistributor
  • Removed redundant self-calling self._defer_handle_next() when capacity is zero

MagicDistributor

  • Replaced event-based bookkeeping with dedicated Delivery and NodeDelivery objects
  • Added properties:
    • node_deliveries list to Delivery
    • in_process flag to both Delivery and NodeDelivery
    • state_delivery_evt and label_delivery_evt to NodeDelivery
  • Consolidated multiple event tracking properties into _deliveries and _archived_deliveries
  • Modified signatures:
    • add_delivery(): now returns Delivery object instead of event
    • abort_delivery(): now accepts Delivery object instead of event
    • abort_all_delivery(): now returns Delivery objects instead of NodeDelivery objects

MagicQLink

  • Updated to accommodate signature changes in MagicDistributor.abort_all_delivery()
Edited by Michał van Hooft

Merge request reports

Loading