scramjetorg / transform-hub

Scramjet Transform Hub (STH) is a runtime supervisor that can run data processing programs called Sequences and manage local resources on any Linux server, Docker on small edge servers, and even large-scale Kubernetes clusters in the cloud or datacenters. It connects to Scramjet Spaces in Scramjet Cloud Platform.
GNU Affero General Public License v3.0
67 stars 8 forks source link

Fix reconnect logging and memleak #1068

Closed MichalCz closed 1 month ago

MichalCz commented 8 months ago

What?

Why?

Currently a reconnect causes a double call to hookupStreams which pipes multiple streams to the input. This unhooks the streams on reconnect, so there are no extra listeners and we're not causing a refleak.

This only happens when a sequence stream errors out.

Additionally stream connect and reconnect errors are muted while connecting and logging happens only on disconnection.

Reproduce:

Review checks:

These aspects need to be checked by the reviewer:

MichalCz commented 8 months ago

We need to double check if an error in sequence does kill it.

EDIT: fixed it.

alicja-gruzdz commented 8 months ago

It does not break the existing functionalities of Reconnect. Side note: it did not fix https://app.clickup.com/t/86944kkf4