Skip to content

Reset callbacks when Cartridge roles hot reload #378

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

Closed
oleg-jukovec opened this issue Jun 21, 2022 · 1 comment · Fixed by #406
Closed

Reset callbacks when Cartridge roles hot reload #378

oleg-jukovec opened this issue Jun 21, 2022 · 1 comment · Fixed by #406
Assignees
Labels
bug Something isn't working

Comments

@oleg-jukovec
Copy link

oleg-jukovec commented Jun 21, 2022

After #341 callbacks don't reset too. It seems like an unexpected behavior.

At least with cartridge, because each:

myapp.router> require("cartridge.roles").reload()
myapp.router> metrics = require("metrics")

adds 16 callbacks to:

self.callbacks = {}

16, 32, 48...

Old callbacks may be outdated or use outdated data. If we call them, it can lead to unexpected errors.

@filonenko-mikhail
Copy link
Contributor

Let's reset callbacks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants