Skip to content

Solve synchronization issue with streams

Wout De Nolf requested to merge 1699-ci-broken-after-mr-2448 into master

Closes #1699 (closed) Closes #1806 (closed)

Fixed priority, order and synchronization of stream subscribing. The issues that caused the observed synchronization problems became clear only after refactoring:

  • Raw stream events has a class implementation with encode and decode methods. Before we had dict and the dictionary structure and encode/decoding logic was owned by the DataNode derived classes. Was important to discover stream subscribing bugs.
  • Lima decoding in image URI's or images (from server of files) moved from LimaDataView to the streaming event class to be consistent with StreamEvent classes containing all decoding logic. The difference with other StreamEvent classes is that the stream data itself is not enough to do the decoding.
  • Refactored the DataNode walk logic (reuse code that was copy/paste before). Was important to discover stream subscribing bugs.
  • DataNode can now be walked. No need for DataNodeIterator and SCAN_TYPES to do something special for the scan nodes. The classes themselves contain the logic from DataNodeIterator.
  • Refactored the stream-reader logic (now a class instead of closure). Was important to discover stream priority bugs.
  • ChannelDataNode and LimaImageChannelDataNode now share the same base class
  • Fixed issues with filter when walking nodes
  • Added more node-walking tests to test_publishing (test walk filter for example)

Nothing has changed in the number of events published and the streams in which those are published.

Edited by Wout De Nolf

Merge request reports

Loading