Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reconnect logging and memleak #1068

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

MichalCz
Copy link
Member

@MichalCz MichalCz commented Mar 20, 2024

What?

  • Fix the logging levels on reconnect from the runner
  • Unhook streams before reconnecting an instance

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:

  • Create an instance that sends an error on output (out.emit("error", new Error()))
  • Observe the chain of reconnects

Review checks:

These aspects need to be checked by the reviewer:

  • Verify and confirm operation (please post a screenshot)
  • All STH tests pass
  • All Scramjet Cloud Platform tests pass
  • Documentation is updated or no changes

@MichalCz MichalCz marked this pull request as ready for review March 21, 2024 00:04
@MichalCz
Copy link
Member Author

MichalCz commented Mar 21, 2024

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

EDIT: fixed it.

@alicja-gruzdz
Copy link
Contributor

alicja-gruzdz commented Mar 22, 2024

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

@MichalCz MichalCz merged commit 9fbfef2 into devel Oct 8, 2024
19 checks passed
@MichalCz MichalCz deleted the fix/reconnect-improvement branch October 8, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants